dpaton05
Well-known Member
- Joined
- Aug 14, 2018
- Messages
- 2,352
- Office Version
- 365
- 2016
- Platform
- Windows
I have a filter that is run on my sheet. The data starts in A4 and I am trying to write the code that will determine if there is more than 1 result for the autofiler, ie. there are more visible rows eg. row 4, row 5 etc
So far I have this code but this code counts the actual cells, not just the visible ones.
Can someone tell me the code to count the visible rows please?
So far I have this code but this code counts the actual cells, not just the visible ones.
VBA Code:
Dim lRow As Long
lRow = ws.Cells(ws.Rows.Count, 1).End(xlUp).Row
If lRow > 4 Then
Can someone tell me the code to count the visible rows please?