<pre>For i = 1 To .UsedRange.Rows.Count If IsNumeric(.Cells(i, 6).Value) = True And .Cells(i, 6).Value <> "" Then If firstnum = "" Then firstnum = .Cells(i, 6).Address(False, False) End If If .Cells(i + 1, 6).Value = "" Then lastnum = .Cells(i, 6).Address(False, False) i = i + 1 .Cells(i, 6).Formula = "=SUM(" & firstnum & ":" & lastnum & ")" firstnum = "" End If
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)