ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   conditional counting of autolist cells/rows (https://www.excelbanter.com/excel-discussion-misc-queries/46882-conditional-counting-autolist-cells-rows.html)

johli

conditional counting of autolist cells/rows
 

Having a bit of a problem with autolist/count function

Have written a function for counting visible cells for an autolist.
Was hoping that the following code would work:
Rng is the range for the autolist column in question:

rng.SpecialCells(xlCellTypeVisible).count - should count the visible
cells.

this counts all rows not just the visible ones...

would like to use countif to count conditionally to like:

worksheetfunction.CountIf(rng.SpecialCells(xlCellT ypeVisible),3) -
should count visible cells with he value 3 in he appropriate column...

Probably me being stupid but why doesn't it work, please help!!

/Johan Litsén


--
johli
------------------------------------------------------------------------
johli's Profile: http://www.excelforum.com/member.php...o&userid=27388
View this thread: http://www.excelforum.com/showthread...hreadid=470203



All times are GMT +1. The time now is 05:24 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com