Can you search for lengths with find command?

J

John

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
 
R

Rick Rothstein

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)
 
J

John

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top