Moonbeam111
Board Regular
- Joined
- Sep 24, 2018
- Messages
- 73
- Office Version
- 365
- 2010
I have a macro in sheet2 that looks for a range in "S1:W30" and if its doesnt find any of those word in cell c3 of sheet2 then it alerts me. C3 of sheet2 always equals cell I21 of sheet 1. However, I have a word infront of I21 that I would like for it ignore, lets call that word "Boat". The cell in sheet I21 of sheet 1 always consists of two words and the first word is always boat. How can I have the word in Cell C3 of sheet2 be searched for but exclude the specific word "boat"? And also not put the word boat there when making them equal (see last line of code).
Here is what I have but I dont know how to ignore the first word of the two different words in sheet 1 C21.
Here is what I have but I dont know how to ignore the first word of the two different words in sheet 1 C21.
VBA Code:
Dim f As Range
Set f = Sheets("Sheet2").Range("S1:W30").Find(Range("I21"), , xlValues, xlWhole, , , False)
If Not f Is Nothing Then
Else: Msgbox "New Data Found!"
Sheets("Sheet2).Range("C3") = Sheets("Sheet1").Range("I21")
End If