COUNTIFS return to 0

xdenama

New Member
Joined
Feb 12, 2016
Messages
39
Office Version
  1. 365
Hi all,

I have formula that's not working...

=COUNTIFS(A1:F5,"FARM A",A1:F5,"Orange")
return "0"
Required answer is 2

Please help...


ABCDEF
1​
STOR ASTOR BSTOR CSTOR DSTOR E
2​
FARM AOrangeAvocadosBananasCherryOrange
3​
FARM BGrapeCherryGuavaBananasBananas
4​
FARM COrangeBananasOrangeBananasAvocados
5​
FARM DGrapeGuavaGrapeGuavaCherry
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
You can't COUNTIF across multiple columns, you'd need =COUNTIFS(A1:A5,"FARM A",B1:B5,"Orange")+COUNTIFS(A1:A5,"FARM A",C1:C5,"Orange")+etc...
 
Upvote 0
Easier way:
=SUMPRODUCT(($A$2:$A$5="Farm A")*($B$2:$F$5="Orange"))
Yess.. excellent, thank you...

But if I change the fruit name with code, example "Orange" with "1176", text convert to number, then answer is BLANK...
 
Upvote 0
Yess.. excellent, thank you...

But if I change the fruit name with code, example "Orange" with "1176", text convert to number, then answer is BLANK...
You are welcome. If you're counting instances of a number, enter it as a number, not text, like:

=SUMPRODUCT(($A$2:$A$5="Farm A")*($B$2:$F$5=1176))
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,257
Members
449,075
Latest member
staticfluids

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top