Using COUNTIFS with multiple columns and criteria

Kthom019

New Member
Joined
May 16, 2017
Messages
46
I am attempting to use the COUNTIF function to count multiple criteria from a database.

I want to count all of column "A" if the criteria are met in Columns G, H,AX,V

I have tried the below function so far, which returned a zero value.

If column G = Apples or Oranges, then count column A.
=COUNTIFS('DIS'!$A$:$A$,A$21,'DIS'!$G$:$G$,$AC$12&"_"&$AC$15)
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Thanks Aladin.

My issue is that using SUMPRODUCT lengthens the processing time. I wanted to avoid using it.
 
Upvote 0
Hi,

I believe SUM will work just as well:

=SUM(COUNTIFS('DIS'!$A:$A,A$21,'DIS'!$G:$G,{"apples","oranges"}))
 
Upvote 0
Hi,

I believe SUM will work just as well:

=SUM(COUNTIFS('DIS'!$A:$A,A$21,'DIS'!$G:$G,{"apples","oranges"}))

Thanks jtakw.
It does work only when I type the words. I cannot link to a cell. I will type the words. Gracias.

I am also seeking a countif function to fill in for the below:
SUMPRODUCT ('DIS'!$E:$E=A$23)*('DIS'!$H:$H="TRUE")

I have tried the below and it returned zero.
=COUNTIF ('DIS'!$E:$E,'TRUE')
 
Upvote 0
Thanks Aladin.

My issue is that using SUMPRODUCT lengthens the processing time. I wanted to avoid using it.

SUMPRODUCT is summing just two figures COUNTIFS delivers. If you need to place Apples and Oranges in cells of their own, say in X2:Y2, SUMPRODUCT would be an admissible choice.


 
Upvote 0

Forum statistics

Threads
1,214,644
Messages
6,120,709
Members
448,983
Latest member
Joaquim_Baptista

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