Thread: Cells.Find
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Arturo Arturo is offline
external usenet poster
 
Posts: 108
Default Cells.Find

Looping through a column in sheet1 storing the first cell in variable
Y_CellBase, followed by activating sheet 2 and searching for that value. .If
theres a match Ive got down what to do. If theres no match on sheet 2 I
need to do something else. Im not sure how to handle the issue of no match
being found. So spastically put if match found then do this else do that€¦.

Worksheets(1). Activate
((Looping code here starting at first cell))
Y_CellBase = ActiveCell.Value
Worksheets(2).Activate

Cells.Find(What:=Y_CellBase, _
After:=ActiveCell, _
LookIn:=xlFormulas, _
LookAt:=xlPart, _
SearchOrder:=xlByColumns, _
SearchDirection:=xlNext, _
MatchCase:=False, _
SearchFormat:=False).Activate


Appreciatively,
Arturo