Good Afternoon,
I have this code
Set target = Sheets("Database").Cells.Find(What:=EmNum, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False)
and it is working fine if I want to search an the entire sheet, but I would only like to search 3 columns J-N. I change the above code to this
Set target = Sheets("Database").Columns ("J:N.Find(What:=EmNum, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False)
I also tried this
Set target = Sheets("Database").Range ("J1:N1000").Find(What:=EmNum, After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False)
neither would find the number I was looking for. The first one does. For example I was searching for N12698. The first code finds it but if I try to just narrow into the 3 columns the target variable comes back as empty.
I would appreciate any thoughts anyone would have on this.
Thank you
Bookmarks