Google Sheets: Multiple Criteria with ArrayFormula/SUM/IF/COUNTIFS

jasonjack

New Member
Joined
Apr 30, 2014
Messages
26
Office Version
  1. 365
Platform
  1. MacOS
Hi,

Is it possible to have more than 2 criteria within the following formula?

CELL G7: =ArrayFormula(SUM(IF("APAC"=A2:A11, 1/COUNTIFS(A2:A11,"APAC",D2:D11,D2:D11,E2:E11,G6)),0))

The aim is to count the number of unique occurrences of APAC in weight 18.

CELL G8: =ArrayFormula(SUM(IF(FREQUENCY(IF(E2:E11=G6,IF(A2:A11=F7,MATCH(C2:C11,C2:C11,0))),ROW(C2:C11)-ROW(C2)+1),C2:C11)))

This then looks at the unique occurrences of APAC and sums the total minutes.

I would like to add Column D as another criteria within each calculation.

1621796745918.png


Many Thanks
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
What exactly constitutes a unique occurrence of APAC?
 
Upvote 0
Since you're filtering for a specific week and supplier, you could use:

=COUNTUNIQUE(FILTER(C2:C11,(A2:A11="APAC")*(E2:E11=G6)*(D2:D11="Supplier")))
 
Upvote 0
Since you're filtering for a specific week and supplier, you could use:

=COUNTUNIQUE(FILTER(C2:C11,(A2:A11="APAC")*(E2:E11=G6)*(D2:D11="Supplier")))
Not quite:

For Week 18 I would to know the total number of occurrences of APAC where there is a unique number of Minutes.

For example Week 18 for APAC would have 5 occurrences: 1 x 36, 1 x 74, 1 x 100, 1 x 200 and 1 x 500.

However, I may want to break that down further to include Supplier for APAC giving me 4 occurrences: 2 x ABC1 (36 and 74 Minutes) 1 x ABC2 (100), 1 x ABC3 (200) and 1 x ABC4 (500).
 
Upvote 0
It was the latter that I was addressing since I thought that was the intent of your question. For the former, you'd just move the D column into the first filter argument:

Excel Formula:
=COUNTUNIQUE(FILTER(C2:D11,(A2:A11="APAC")*(E2:E11=G6)))
 
Upvote 0

Forum statistics

Threads
1,223,239
Messages
6,170,947
Members
452,368
Latest member
jayp2104

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