Counting cells with data in them
Try this:
Sub count_filled()
Dim sectornum As Long
Dim rngX As Range
Dim lngX As Long
Range("D1", Range("D65536").End(xlUp)).Select
sectornum = Selection.Count
lngX = Application.WorksheetFunction.CountBlank(Selection )
MsgBox CStr(sectornum - lngX)
End Sub
Regards,
Wes
|