View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Cynthia[_4_] Cynthia[_4_] is offline
external usenet poster
 
Posts: 5
Default Count of all non empty "records"

Hi all,

I would like to get a count of all non empty "records" (range of Ax:Px) and tried to use this code,
but it keeps returning 32767...is this the correct way?

intRow = 2
RecordCount = 0

For i = intRow To Rows.Count
If Sheet2.Range("A" & intRow & ":P" & intRow).Value < "" Then
RecordCount = RecordCount + 1
Else
Exit For
End If
Next

Thank you

Cindi