ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Why cant I use =countif(Jan:Mar!$b3) (https://www.excelbanter.com/excel-worksheet-functions/41188-why-cant-i-use-%3Dcountif-jan-mar-%24b3.html)

Puzzler

Why cant I use =countif(Jan:Mar!$b3)
 
=sum(Jan:Mar!$b3) works fine. Why can't I use this same 3d reference with
the countif option. The values in the cells are all numbers - but I receive a
#value error.

Chip Pearson

Not all functions support 3D ranges. COUNTIF doesn't.


I
"Puzzler" wrote in message
...
=sum(Jan:Mar!$b3) works fine. Why can't I use this same 3d
reference with
the countif option. The values in the cells are all numbers -
but I receive a
#value error.




Harlan Grove

Puzzler wrote...
=sum(Jan:Mar!$b3) works fine. Why can't I use this same 3d reference with
the countif option. The values in the cells are all numbers - but I receive a
#value error.


Because Microsoft wasn't sufficiently passionate about this aspect of
your potential.

You'll need to use a list of worksheet names, ideally referring to it
using a defined name like WSLst. For your sample formula above, you
could define WSLst as ={"Jan";"Feb";"Mar"} and use a formula like

=SUMPRODUCT(COUNTIF(INDIRECT("'"&WSLst&"'!B3"),<wh atever))



All times are GMT +1. The time now is 03:45 AM.

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