dear all,
I use following code to find different values in a specific range.
now I need to add the condition that,if the values are not found then the range have to be empty
I try differen way but not working ...can someone help tks
Dim sString As String
Dim MyAr
Dim i As Long
Dim delRange As Range, aCell As Range
Dim ws As Worksheet
Set ws = ThisWorkbook.Sheets("Sheet1")
'~~> Add more to the list here separated by "/"
sString = "KIX/NRT/CGO"
MyAr = Split(sString, "/")
With ws
For i = LBound(MyAr) To UBound(MyAr)
Set aCell = .Range("G5:K5").Find(What:=MyAr(i), LookIn:=xlValues, _
LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False)
If Not aCell Is Nothing Then
Sheet1.Range("f24").Value = "***ADDITIONAL ADDRESSES NEEDED"
Sheet1.Range("f12").Value = "***ADDITIONAL ADDRESSES NEEDED"
Sheet1.Range("f14").Value = "***ADDITIONAL ADDRESSES NEEDED"
End If
Next i
End With
Bookmarks