Forum Discussion
lyc999
Aug 07, 2024Copper Contributor
COUNTIFS returns #VALUE!. Each of the criteria works in its countif. Reason: compare span 2 cols.
Hi: I have a COUNTIFS return #VALUE! when each of the 2 criteria would work in a COUNTIF on its own. So, =COUNTIF($B$6:$C$33,"Apple") and =COUNTIF($D$6:$D$33,"US") both work on their own each ret...
- Aug 07, 2024
The range arguments of COUNTIFS must have the same size.
Option 1: add 2 separate COUNTIFS:
=COUNTIFS($B$6:$B$33,"Apple",$D$6:$D$33,"US")+COUNTIFS($C$6:$C$33,"Apple",$D$6:$D$33,"US")
Option 2: use SUM or SUMPRODUCT
=SUMPRODUCT((B6:C33="Apple")*(D6:D33="US"))
HansVogelaar
Aug 07, 2024MVP
The range arguments of COUNTIFS must have the same size.
Option 1: add 2 separate COUNTIFS:
=COUNTIFS($B$6:$B$33,"Apple",$D$6:$D$33,"US")+COUNTIFS($C$6:$C$33,"Apple",$D$6:$D$33,"US")
Option 2: use SUM or SUMPRODUCT
=SUMPRODUCT((B6:C33="Apple")*(D6:D33="US"))
- lyc999Aug 07, 2024Copper Contributorgot it. Tyvm!