Dear All,
I have this code to check if a value is in a column but I need to search on two columns. How can I change the definition of the range? I've tried
but it doesn't work.
Thank you
miami2k
I have this code to check if a value is in a column but I need to search on two columns. How can I change the definition of the range? I've tried
VBA Code:
With Sheets("Workings").Range("H:H, O:O")
but it doesn't work.
VBA Code:
a = Combo_Attività.Value
If Trim(a) <> "" Then
With Sheets("Workings").Range("H:H")
Set Rng = .Find(What:=a, _
After:=.Cells(.Cells.Count), _
LookIn:=xlValues, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)
If Not Rng Is Nothing Then
Application.Goto Rng, True 'value found
Else
MsgBox "Activity not existing" 'value not found
End If
End With
End If
Thank you
miami2k