View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz JLGWhiz is offline
external usenet poster
 
Posts: 3,986
Default macro to intsert a word using the "Find" command to search for a w

Substitute the word you want to find in place of YourWord and add the command
to do what you want to do where it says 'Do something with the word, if the
word is found.

With Worksheets(1).Columns("A")
Set c = .Find(YourWord, lookin:=xlValues)
If Not c Is Nothing Then
firstAddress = c.Address
Do
'Do something with the word
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address < firstAddress
End If
End With


"Stuart" wrote:

Just the same as the subject.

Need a macro to lookdown column A and find a word or two words hence I
think I need the Find command within the macro.

Hope someone can help

cheers

Stuart