This little sub will tell you how many rows you have with something in them:
Sub GetRows()
Dim C As Range
Worksheets(1).Activate
[F10:F10010].Select
For Each C In Selection.Cells
If C.Value <> "" Then
Counter = Counter + 1
End If
Next C...
I do this in two steps--one to find the number of rows, dynamically and the next to actually do the sorting on the range selected.
Here's the subroutine to find the number of rows on a worksheet:
Sub GetRows()
Dim C As Range
Worksheets(1).Activate
[F10:F10010].Select
For Each C...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.