Thread: cells.find...
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
cornishbloke cornishbloke is offline
external usenet poster
 
Posts: 1
Default cells.find...

Having used the following how do I amend it so that if the search fail
to find the name in column B of Sheet2 it goes on to check column B o
Sheet3? Also how do I prevent it from crashing when the entered name i
not found at all??

Sub FIND_NAME()

Dim MyName As String
MyName = ActiveSheet.Range("A1").Value
Sheets("Sheet2").Activate
Sheets("Sheet2").Cells.Find(What:=MyName, _
LookAt:=xlPart, MatchCase:=False).Activate

End Sub

Any help/pointers would be greatly appreciated

--
Message posted from http://www.ExcelForum.com