Thread: Find method
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
nk nk is offline
external usenet poster
 
Posts: 5
Default Find method

Is this posible to get a row number(when the value 2 was find) with a
Find metod in code:
With Worksheets(1).Range("a1:a500")
Set c = .Find(2, lookin:=xlValues)
If Not c Is Nothing Then
firstAddress = c.Address
Do
c.Value = 5
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address < firstAddress
End If
End With

Thanks'