Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 87
Default Can you search for lengths with find command?


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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Can you search for lengths with find command?


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" wrote in message
...
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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 87
Default Can you search for lengths with find command?


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
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
Economical grouping of lengths out of much longer lengths Richard (a Builder not a Mathematician) Excel Worksheet Functions 1 January 19th 08 10:28 PM
macro to intsert a word using the "Find" command to search for a word Stuart[_3_] Excel Programming 1 November 29th 06 05:13 AM
Excel has a "Find Next" command but no "Find Previous" command. Michael Fitzpatrick Excel Discussion (Misc queries) 2 January 10th 05 11:45 PM
Create a search Field within a worksheet to search command buttons Ed P[_2_] Excel Programming 1 December 14th 04 08:04 PM
search or goto command needed. mightymax Excel Programming 1 July 26th 04 03:42 AM


All times are GMT +1. The time now is 01:36 AM.

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"