Thread: Find all in vba
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Walter Briscoe Walter Briscoe is offline
external usenet poster
 
Posts: 279
Default Find all in vb.

In message
..com of Sat, 18 Dec 2010 07:17:53 in microsoft.public.excel.programming
, Don Guillett Excel MVP writes
On Dec 18, 8:25*am, Walter Briscoe
wrote:
Dave,
Thanks for the prompt reply. I was aware of both for each and find,
findnext. I was hoping to find a more powerful technique that might be
available to do "Find All". Your response suggests no such technique
exists. I shall probably code find, findnext as it makes it easier to
step through the code than using for each.


[snip]

If your object is to replace all instances of the minimum then have
your macro determine the minimum and then use REPLACE to replace all
instances. Be careful that you don't replace something you don't want
to.


Don,
Thanks for the reply. The REPLACE method of the Range type will not
serve.
I need to find cells which are a given offset from the matched cells.
REPLACE, internally, can be considered to find an array of matches and
apply a change to the elements of that array. I want a function which
will return that array. It seems no such array function has been
provided by Microsoft.

The filter VBA function almost does what I want. It searches an array; I
want to search a range. The Excel filter capability may define what I
want.

A custom autofilter or two may do the job.
Select all and insert in another sheet makes copies of the relevant data
available.
Is there another method for going through the matching rows.
Down arrow after the filtration was not recorded by the macro recorder.
--
Walter Briscoe