I am not sure if this Is any help but this code might help you a bit.
Global a As Integer
Sub Button1_Click()
If a = 0 Then
a = 1
End If
Range("a" + Trim(Str(a)), Range("a" + Trim(Str(a))).End(xlDown)).Select
Range(ActiveCell, ActiveCell.End(xlDown)).Select
a = Selection.Rows.Count
End Sub
----------------------
a = the number of the row that is selected and nearest to the bottom of the page.
All this does is go from the top cell to the the next cell with somthing in it, and then from that cell down to the next with something in it.
|