View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Toppers Toppers is offline
external usenet poster
 
Posts: 4,339
Default Search using the words in a cell

Hi,
Look at VBA FIND function. Code below is modified from VBA help.


HTH

With Worksheets(1).Range("a1:a500") ' Search A1 to A500 in Worksheets(1)

MyWord=Range("c1") ' <== change for your Cell(s)

Set c = .Find(MyWord, lookin:=xlValues)
If Not c Is Nothing Then ' MyWord found .....
firstAddress = c.Address
Do
..... add your code
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address < firstAddress 'Keep
searching until all found
End If
End With


"jj33002" wrote:


Is there any way to search using the words in a cell? The reason I need
to do that is because I have to enter in a lot of data and need to
search each word entered in each seperate cell and find it on a
different page.


--
jj33002
------------------------------------------------------------------------
jj33002's Profile: http://www.excelforum.com/member.php...o&userid=30020
View this thread: http://www.excelforum.com/showthread...hreadid=497369