View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Ardus Petus Ardus Petus is offline
external usenet poster
 
Posts: 718
Default COUNTIF criteria in VBA

You have to loop thru independent cells, because you must evaluate condition
against each cell's contents.

--
AP

"whitehurst" a
écrit dans le message de news:
...

Thank you, I figured criteria expressions could be more complicated than
just appending, but I guess that can't be!

Can anybody think of a way to write CountVIf without having to loop
over each cell? I was wanting to use SpecialCells(xlCellTypeVisible)
and then just pass the result range (which would have multiple areas)
into EVALUATE(COUNTIF(newRange, criteria)), but specialcells doesn't
seem to work in UDFs - which sucks.

Thanks.


--
whitehurst
------------------------------------------------------------------------
whitehurst's Profile:
http://www.excelforum.com/member.php...o&userid=34544
View this thread: http://www.excelforum.com/showthread...hreadid=550351