View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
joel[_19_] joel[_19_] is offline
external usenet poster
 
Posts: 1
Default Macro analyses Cell.Serches for given word,the puts text in cell a


I'm using column A (specified in 2 places). changge as required.


Set c = Columns("A").Find(what:="price", _
LookIn:=xlValues, lookat:=xlWhole)
If Not c Is Nothing Then
FirstAddr = c.Address
Do
If c.Offset(-1, 0) = "" Then
c.Offset(-1, 0) = "unknown product"
End If

Set c = Columns("A").FindNext(after:=c)
Loop While Not c Is Nothing And c.Address < FirstAddr
End If


--
joel
------------------------------------------------------------------------
joel's Profile: http://www.thecodecage.com/forumz/member.php?userid=229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=145279