Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Can you chose to look for a word *before* something, aswell as after Cells.Find("word", After:=Equity.............. If not how I can i get around it, can i ask it to search within a rang on a worksheet? ie within range A2:A500 -- CarolineHedge ----------------------------------------------------------------------- CarolineHedges's Profile: http://www.excelforum.com/member.php...fo&userid=3570 View this thread: http://www.excelforum.com/showthread.php?threadid=56696 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Yes. Instead of using 'Cells' as the range in the Find call, which is
the entire worksheet, you can specify any range in which it will search in. So Range("A2:A500").Find("word", .. , should work. Be careful with the find since it saves the settings for all the arguments it uses each time. Always a good idea to just set them to what you need each time. The help menu gives some good explanations. CarolineHedges wrote: Can you chose to look for a word *before* something, aswell as after: Cells.Find("word", After:=Equity.............. If not how I can i get around it, can i ask it to search within a range on a worksheet? ie within range A2:A500? -- CarolineHedges ------------------------------------------------------------------------ CarolineHedges's Profile: http://www.excelforum.com/member.php...o&userid=35705 View this thread: http://www.excelforum.com/showthread...hreadid=566967 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Thanks ImpulseBlue Yes I've notice that happens with the find! Thanks very much. I'll give it a g -- CarolineHedge ----------------------------------------------------------------------- CarolineHedges's Profile: http://www.excelforum.com/member.php...fo&userid=3570 View this thread: http://www.excelforum.com/showthread.php?threadid=56696 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Nope. You're looking After:= a cell.
But you could find "Equity" first, then look after that found cell. dim FoundEquity as range dim FoundWord as range with activesheet set foundequity = .cells.find(what:="equity", ..... if foundequity is nothing then msgbox "Equity wasn't found!" else set foundword = .cells.find(what:="word", after:=foundequity, ... end if end with CarolineHedges wrote: Can you chose to look for a word *before* something, aswell as after: Cells.Find("word", After:=Equity.............. If not how I can i get around it, can i ask it to search within a range on a worksheet? ie within range A2:A500? -- CarolineHedges ------------------------------------------------------------------------ CarolineHedges's Profile: http://www.excelforum.com/member.php...o&userid=35705 View this thread: http://www.excelforum.com/showthread...hreadid=566967 -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Find Function | Excel Discussion (Misc queries) | |||
Find function | Excel Worksheet Functions | |||
Find function | Excel Worksheet Functions | |||
Find Function | Excel Programming | |||
backwards find function to find character in a string of text | Excel Programming |