Forum Discussion
What is wrong with this formula?
=COUNTIFS(AA2:AB2,">1",AC2:AF2,">0")
I'm getting the #VALUE! answer...
excelisfunny wrote: ``I suppose when you start a question off with "why doesn't this work" without explaining what I'm trying to do...``
Yup. GIGO!
-----
excelisfunny wrote: ``I need the total count of [...] those have to be over 1 to count, PLUS the total count of four other cells that have to be over 0 [....] If there is another way to do it I'm all ears.``
For that purpose, your COUNTIF(...)+COUNTIF(...) expression is exactly how I would do it.
But I would eschew the outer parentheses. IOW, I would write =COUNTIF(...)+COUNTIF(...).
I never said nor implied otherwise. As you noted, I could not comment on it since I did not know your intent.
7 Replies
- Detlef_LewinSilver ContributorDifferent count of columns.
AA2:AB2 2 columns.
AC2:AF2 4 columns.- excelisfunnyCopper Contributor
I'm confused on why that matters... Detlef_Lewin
A workaround that I used that ended up working was:
=(COUNTIF(AB2:AC2,">1") + COUNTIF(AD2:AH2,">0"))
- Detlef_LewinSilver Contributor
I'm confused on why that matters...Because Microsoft says so:
The Criteria_range argument must contain the same number of rows and columns as the Sum_range argument.