billandrew
Well-known Member
- Joined
- Mar 9, 2014
- Messages
- 743
Hello All
Trying to sum range above when cell is Blank. Using the below code.
Trying to sum range above when cell is Blank. Using the below code.
Code:
Sub SumBlank()Dim lr&
Dim i&
lr = Cells(Rows.Count, 1).End(xlUp).Row
total = 0
With ActiveSheet
For i = 1 To lr + 1
If Cells(i, 1) <> "" Then
total = total + Cells(i, 1)
End If
Next
End With
End Sub