Try this:
Blank is an often confusing term with regard to Excel and here I've taken
you literally i.e. nothing on the cell, totally empty.
Call with
=countblanks()
Function countblanks()
For x = ActiveCell.Row - 1 To 1 Step -1
If Cells(x, ActiveCell.Column).Formula = vbNullString Then
countblanks = countblanks + 1
Else
Exit Function
End If
Next
End Function
Regards,
Jerry
|