Finding every instance of a value in a multi-sheet workbook

  • Thread starter Thread starter Maury Markowitz
  • Start date Start date
M

Maury Markowitz

I need to find every occurrence of a unique ID in a multi-sheet
workbook.

I have already implemented this in code simply by looping over the
sheets, finding the column (it can potentially move from sheet to
sheet, but doesn't yet), and then looping over that column to find the
row numbers and put them in an array.

But now I'm thinking that this might not be the best way to do this,
and some sort of Find would be more efficient. I've never seen
anything like this though, a variation of Find that returns a single
"something" with all of the hits in it.

Any ideas?

Maury
 
How about this suggestion??

If you have to have your own code, look at .findnext in VBA's help.
 
How about this suggestion??

If you have to have your own code, look at .findnext in VBA's help.

I did. However, MS, in their infinite wisdom, decided that .FindNext
will not look in hidden cells. The cells I'm looking for are, of
course, hidden. FindNext has all sorts of other problems too, I find
it to be generally unstable in terms of predictable behavior.

BTW, a text editor demonstrated that FlexFind also uses Find/FindNext.

Maury
 
You can either unhide all the columns/rows or you can loop through the usedrange
of each sheet.

I don't think that there's any middle ground.
 
Back
Top