Thread: Count rows
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Hugh[_2_] Hugh[_2_] is offline
external usenet poster
 
Posts: 3
Default Count rows

Hi there,

How to count data rows? I tried following sub. It did not
work.

Private Sub CountRows()
Dim iCount As Long
iCount = 1
While Sheet1.Range("B" & iCount).Value < " "
iCount = iCount + 1
Wend
End Sub

Thanks in advance for your help.