PC Review


Reply
Thread Tools Rate Thread

Can you search for lengths with find command?

 
 
John
Guest
Posts: n/a
 
      29th Jun 2009

I'm using find command on a discontinuous range. (its the union of 4-5
ranges) Is there anyway to find all the cells in the range with a length
of 3 without just using FindNext and checking if it's len 3? I'm looking
for something like:

FirstFound = Quadrants(n).Find(what:=LENGTH=3, etc. etc.
SecondFound = Quadrants(n).FindNext(FoundFirst)

Since its numbers I could also use val >99<1000


It would save a lot of looping time

John
 
Reply With Quote
 
 
 
 
Rick Rothstein
Guest
Posts: n/a
 
      29th Jun 2009

Use "???" as your What argument and xlWhole as the LookAt argument. Assuming
Quadrants is an array of Ranges, something like this...

Set FirstFound = Quadrants(n).Find(What:="???", LookAt:=xlWhole, etc.)
Set SecondFound = Quadrants(n).FindNext(FoundFirst)

--
Rick (MVP - Excel)


"John" <(E-Mail Removed)> wrote in message
news:e5vfAxE%(E-Mail Removed)...
> I'm using find command on a discontinuous range. (its the union of 4-5
> ranges) Is there anyway to find all the cells in the range with a length
> of 3 without just using FindNext and checking if it's len 3? I'm looking
> for something like:
>
> FirstFound = Quadrants(n).Find(what:=LENGTH=3, etc. etc.
> SecondFound = Quadrants(n).FindNext(FoundFirst)
>
> Since its numbers I could also use val >99<1000
>
>
> It would save a lot of looping time
>
> John


 
Reply With Quote
 
John
Guest
Posts: n/a
 
      29th Jun 2009

Perfect. Thanks. Have to remember to reset the xlWhole to part in later
finds.

What other things can you put in the What:? Are there other wildcards?
Is it possible to have a range of values? Like find anything between 2
and 20? Or where on the web could I find more about it.

John

Rick Rothstein wrote:
> Use "???" as your What argument and xlWhole as the LookAt argument.
> Assuming Quadrants is an array of Ranges, something like this...
>
> Set FirstFound = Quadrants(n).Find(What:="???", LookAt:=xlWhole, etc.)
> Set SecondFound = Quadrants(n).FindNext(FoundFirst)
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do you make the FIND command search new messages FIRST? =?Utf-8?B?cm9ib21hc3Rlcg==?= Microsoft Outlook Discussion 0 4th Aug 2005 04:29 PM
find/ search using a command button =?Utf-8?B?VGVycnk=?= Microsoft Access Forms 0 14th Jun 2005 12:27 AM
Refresh update, select, and insert command parameter lengths in a dataadapter... hyper_x_43@yahoo.com Microsoft ADO .NET 4 10th Jan 2005 06:54 PM
Refresh update, select, and insert command parameter lengths in a dataadapter... Hyper X Microsoft C# .NET 6 10th Jan 2005 05:48 AM
Refresh update, select, and insert command parameter lengths in a dataadapter... hyper_x_43@yahoo.com Microsoft ADO .NET 2 6th Jan 2005 06:10 PM


Features
 

Advertising
 

Newsgroups
 


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