View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default VBA and subtotals

No it can't - there isn't an option to do a special cells on a particular
value. Look in Excel VBA help on the Find or FindNext methods to see code
for finding a value in a range.

--
Regards,
Tom Ogilvy

"rhody" wrote in message
...
This was a great tip for creating a subrange of just the blank cells in
a range so that a value could be put in there to aid the user when the
subtotals are collapsed to level 2.

Can this same method be used for finding cells in a range which contain
a certain value and then changing the value in the adjacent cell? So
instead of using:

Set rng = Range("E2:E" & EndCell)
Set rng1 = rng.SpecialCells(xlBlanks)

Maybe something like

Set rng = Range("E2:E" & EndCell)
Set rng1 = rng. ??? Where value = "Foo"

Any ideas?

TIA
Mike



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/