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

try this to avoid the non stopping cycle

Dim MyName As RANGE
MyName = ActiveSheet.Range("A1").Value

For Each cell In Range("A1:A" & _
Range("A" & Rows.Count).End(xlUp).Row)

'checks to the last USED cell


If Not MyName Is Nothing Then

Sheets("Sheet2").Activate
Sheets("Sheet2").Cells.Find(What:=MyName, _
LookAt:=xlPart, MatchCase:=False).Activate

'do whatever it is you want to do.....

End If

Next cell


also maybe you can modify it so instead of looking in Sheet2 only, you
may look in allaof them, but not sure if that's what you want


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