Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find Left$
Hi,
I'm changing some existing code which reads Set rngFound = .Find(What:=theString, after:=.Range("A1"), LookIn:=xlValues, LookAt:=xlPart, searchorder:=xlByColumns, searchdirection:=xlNext, MatchCase:=False, matchbyte:=False) This finds *theString* but what I want it to look at are the first 2 characters only e.g. "40*" and select only those. ( The asterisk doesn't work as in an Access query, either) Is this possible, or is a completely different method needed? Thanks - Kirk |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find Left$
did yiu try
... .Find(What:= LEFT$( theString ,2) , after:=. .... "kirkm" wrote in message ... Hi, I'm changing some existing code which reads Set rngFound = .Find(What:=theString, after:=.Range("A1"), LookIn:=xlValues, LookAt:=xlPart, searchorder:=xlByColumns, searchdirection:=xlNext, MatchCase:=False, matchbyte:=False) This finds *theString* but what I want it to look at are the first 2 characters only e.g. "40*" and select only those. ( The asterisk doesn't work as in an Access query, either) Is this possible, or is a completely different method needed? Thanks - Kirk |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find Left$
On Thu, 18 Jun 2009 12:52:07 +0100, "Patrick Molloy"
wrote: .Find(What:= LEFT$( theString ,2) Yes, although that finds every instance of the two characters, not just cells that start with them. I could filter and fix the result somehow but maybe there is another way? Thanks - Kirk |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
FIND from right to left instead of left to right | Excel Worksheet Functions | |||
Help putting left, right, find and len together | Excel Discussion (Misc queries) | |||
How do I find max then sum cells above & to the left? | Excel Worksheet Functions | |||
TO FIND VALUE TO THE LEFT THE CELL USING VLOOKUP OR ANY OTHER | Excel Discussion (Misc queries) | |||
FIND or LEFT or MID to swap first name with last name? | Excel Worksheet Functions |