#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 166
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 166
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
FIND from right to left instead of left to right David Excel Worksheet Functions 8 November 23rd 09 07:23 PM
Help putting left, right, find and len together Glenda Excel Discussion (Misc queries) 5 October 11th 08 11:25 AM
How do I find max then sum cells above & to the left? Iany Excel Worksheet Functions 5 December 22nd 07 12:32 AM
TO FIND VALUE TO THE LEFT THE CELL USING VLOOKUP OR ANY OTHER CAPTGNVR Excel Discussion (Misc queries) 10 February 14th 07 11:16 PM
FIND or LEFT or MID to swap first name with last name? Alice Excel Worksheet Functions 3 January 14th 05 10:17 PM


All times are GMT +1. The time now is 07:07 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"