I have this code provided from a very helpful coder it searches for a string within a range, it currently searches 2 columns and then takes you to the first match.
Was wondering if it can be tweaked so that if there is more than 1 match to ask the user if he wants to go to the next match?
Was wondering if it can be tweaked so that if there is more than 1 match to ask the user if he wants to go to the next match?
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Fnd As Range
If Target.CountLarge > 1 Then Exit Sub
If Target.Address(0, 0) = "F3" Then
Set Fnd = Range("C11:D" & Rows.Count).Find(Target.Value, , , xlPart, , , False, , False)
If Not Fnd Is Nothing Then
Range("C" & Fnd.Row).Activate
Range("C" & Fnd.Row).Copy
'Fnd.Activate
Application.EnableEvents = False
Range("F3").Value = Null
Application.EnableEvents = True
Else
MsgBox "Not Found"
Application.EnableEvents = False
Range("F3").Value = Null
Application.EnableEvents = True
End If
End If
End Sub