In a training worksheet, data is on lines 14-24
Below macro returns a count of 4 lines (but there are actually 11 lines of data.
Below macro returns a count of 4 lines (but there are actually 11 lines of data.
Code:
Sub LineCnt()
Cells(14, 1).Select
Dim r As Integer
r = 1
Do While Cells(r, 1).Value <> ""
r = r + 1
Loop
MsgBox ("Lines found: " & r)
End Sub