Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
for each cell in selection
With Worksheets("Other").Cells set rng = .Find(What:=cell.Value, _ After:=.Range("IV65536"), _ LookIn:=xlFormulas, _ LookAt:=xlPart, _ SearchOrder:=xlByRows, _ SearchDirection:=xlNext, _ MatchCase:=False) End With if not rng is nothing then msgbox cell.Value & " found at " _ & rng.Address(0,0,xlA1,True) else msgbox cell.Value & " not found" end if Next -- Regards, Tom Ogilvy "jj33002" wrote in message ... 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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hello, I appreciate the help I used the code that Tom provided and it does what I wanted it to. The only thing is that instead of a message box of where the cell is found, is there any way to just select that cell? -- jj33002 ------------------------------------------------------------------------ jj33002's Profile: http://www.excelforum.com/member.php...o&userid=30020 View this thread: http://www.excelforum.com/showthread...hreadid=497369 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
search of words | Excel Discussion (Misc queries) | |||
Search And Replace Whole Words | Excel Programming | |||
Search for specific words | Excel Worksheet Functions | |||
Search for multiple words | Excel Discussion (Misc queries) | |||
Search filename containing words | Excel Programming |