I receive an excel file daily. I am trying to select all ROWS if cells from A5 to the end of the dynamic data contains a string "TURNER 232"
I have been copying various examples of code from this website to no avail.
Would appreciate any assistance if possible.
Many thanks Matt
Code used
Sub CustomSelect()
Dim i As Long: i = 2
Do While Range("H" & i).Value = "TURNER 232"
i = i + 1
Loop
Range("A5:H" & i - 1).EntireRow.Select
End Sub
Scott,
I used the below which did the trick.
Thanks mate.1st ever soiree into VBA
Sub CustomSelect()
Dim i As Long: i = 5
Do While Range("A" & i).Value = "TURNER 232"
i = i + 1
Loop
Range("A5:A" & i - 1).EntireRow.Select
End Sub
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.