Caleeco
Well-known Member
- Joined
- Jan 9, 2016
- Messages
- 980
- Office Version
- 2010
- Platform
- Windows
Hello,
I am trying to figure out a bit of code which will fit into a much larger module.
Basically I have an Excel Table, for which the Header Row is in row 6. The table may or may not be filtered.
I want to be able to find the row number of the 25th visible row (even if it is blank and outside of my table range). Step one in my troubleshooting is to just select the range. The code below works, but it also selects hidden rows as part of the '25'.
I don't wish to step through each row in a loop checking the Hidden property of each cell and doing a count if possible.
Any ideas where I'm going wrong?
Help/Guidance is much appreciated
Thanks
Caleeco
I am trying to figure out a bit of code which will fit into a much larger module.
Basically I have an Excel Table, for which the Header Row is in row 6. The table may or may not be filtered.
I want to be able to find the row number of the 25th visible row (even if it is blank and outside of my table range). Step one in my troubleshooting is to just select the range. The code below works, but it also selects hidden rows as part of the '25'.
I don't wish to step through each row in a loop checking the Hidden property of each cell and doing a count if possible.
Any ideas where I'm going wrong?
Code:
Sub Find_25th_Row()
Dim myUniqueCells As Range
Set myUniqueCells = Sheets(“Sheet1").AutoFilter.<wbr>Range.Offset(1, 0).Resize(25, 1).Cells.SpecialCells(<wbr>xlCellTypeVisible)
myUniqueCells.Select
End Sub
Help/Guidance is much appreciated
Thanks
Caleeco