Reputation: 41
I have a spreadsheet named "Copy" sorted by numeric values (lowest to highest) in column H. The sheet has headers in row 1. The lowest value in column H is 0. I would like to find the last row that has column H equal 0 and then select the range of rows where column H equals 0 along with the header row.
Thanks!
Upvotes: 0
Views: 16109
Reputation: 2859
This will do the job
Sub CustomSelect()
Dim i As Long: i = 2
Do While Range("H" & i).Value = 0
i = i + 1
Loop
Range("H1:H" & i - 1).EntireRow.Select
End Sub
Upvotes: 2