Hi All,
I could use some help with getting the VBA on the following.
I have a large range of data, blanks, and multiple duplicate cell values.
I need to find (select) matching cell or cells , and then select the rows of those found cells. Not highlighted, just select.
My search value is in ( "B2" ), Partial text search.
I already got this but cat get the rows s;ected
Private Sub CommandButton1_Click()
Dim Partial_Text As String
Dim Myrange As Range
Partial_Text = Worksheets("2022").Cells(2, 2).Value
Set Myrange = Worksheets("2022").Range("B3:AC500")
For Each cell In Myrange
If InStr(LCase(cell.Value), LCase(Partial_Text)) <> 0 Then
ActiveCell.EntireRow.Select ('Here it fails...)
End If
Next
End Sub
Thanks,
René
I could use some help with getting the VBA on the following.
I have a large range of data, blanks, and multiple duplicate cell values.
I need to find (select) matching cell or cells , and then select the rows of those found cells. Not highlighted, just select.
My search value is in ( "B2" ), Partial text search.
I already got this but cat get the rows s;ected
Private Sub CommandButton1_Click()
Dim Partial_Text As String
Dim Myrange As Range
Partial_Text = Worksheets("2022").Cells(2, 2).Value
Set Myrange = Worksheets("2022").Range("B3:AC500")
For Each cell In Myrange
If InStr(LCase(cell.Value), LCase(Partial_Text)) <> 0 Then
ActiveCell.EntireRow.Select ('Here it fails...)
End If
Next
End Sub
Thanks,
René