Hello guys,
I have a problem with selecting cells from A2 to A(last row) in a macro.
In short - I filter a specific value, then walk all filtered values (unique ID in column A) and do something with them.
I use this:
For Each filtcell In RequestSh.Range("A2:A" & RequestSh.Range("A1").End(xlDown).Row).SpecialCells(xlCellTypeVisible)
If filtcell.Value <> "" Then
something something
End If
Next filtcell
It works in the general case, but as far as I can see, when the last row is 2, the selected range breaks and the loop starts walking through all visible cells (A1
last possible cell in excel)).
Do you have any ideas how to avoid this?
Bookmarks