How to count using multi criteria

rentonhighlands

Board Regular
Joined
Jul 31, 2014
Messages
121
Office Version
  1. 365
Platform
  1. Windows
Please help me write a formula -
At each site code, I want to count how many total connections are delivered.
At each site code, I want to count how many total connections are estimated to be delivered.
At each site code, I want to count separately how many internet connections are delivered at a site.
At each site code, I want to count separately how many Private connections are delivered at a site.
At each site code, I want to count separately how many internet connections are estimated to be delivered.
At each site code, I want to count separately how many Private connections are estimated to be delivered.

Site CodeSite NameTransport Type ACarrier Estimated Delivery DateDelivery Date
Test 1Name 1Internet1/31/2025
Test 2Name 2Private5/31/2025
Test 2Name 2Internet5/31/2025
Test 2Name 2Private5/31/2025
Test 2Name 2Internet5/31/2025
Test 3Name 3Internet5/31/2025
Test 3Name 3Private5/31/2025
Test 3Name 3Private9/30/2025
Test 3Name 3Internet9/30/2025
Test 4Name 4Private4/30/2025
Test 4Name 4Private4/30/2025
Test 4Name 4Internet4/30/2025
Test 4Name 4Internet4/30/2025
Test 5Name 5Private4/30/2025
Test 5Name 5Private4/30/2025
Test 5Name 5Internet4/30/2025
Test 5Name 5Internet4/30/2025
Test 6Name 6Private
Test 7Name 7Internet12/14/2024
Test 7Name 7Private12/14/2024
Test 7Name 7Internet12/14/2024
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Depending on how you want to see your data you couuld use the PIVOTBY or GROUPBY functions.
Here are some links on how to use.



My examples below are for sites that have an estimated delivery date.
Note that the VSTACK function I used with GROUPBY was just to add headers.

Book1
ABCDEFGHIJK
1Site CodeSite NameTransport Type ACarrier Estimated Delivery DateDelivery Date
2Test 1Name 1Internet1/31/2025 InternetPrivateTotal
3Test 2Name 2Private5/31/2025Test 111
4Test 2Name 2Internet5/31/2025Test 2224
5Test 2Name 2Private5/31/2025Test 3224
6Test 2Name 2Internet5/31/2025Test 4224
7Test 3Name 3Internet5/31/2025Test 5224
8Test 3Name 3Private5/31/2025Test 7213
9Test 3Name 3Private9/30/2025Total11920
10Test 3Name 3Internet9/30/2025
11Test 4Name 4Private4/30/2025Estimated Private Delivery
12Test 4Name 4Private4/30/2025SiteTransport Type ACount Est Delivery
13Test 4Name 4Internet4/30/2025Test 2Private2
14Test 4Name 4Internet4/30/2025Test 3Private2
15Test 5Name 5Private4/30/2025Test 4Private2
16Test 5Name 5Private4/30/2025Test 5Private2
17Test 5Name 5Internet4/30/2025Test 7Private1
18Test 5Name 5Internet4/30/2025Total9
19Test 6Name 6Private
20Test 7Name 7Internet12/14/2024
21Test 7Name 7Private12/14/2024
22Test 7Name 7Internet12/14/2024
23
Sheet2
Cell Formulas
RangeFormula
G2:J9G2=PIVOTBY(A2:A22,C2:C22,C2:C22,COUNTA,0,,,,,D2:D22<>"")
G12:I18G12=VSTACK({"Site","Transport Type A","Count Est Delivery"},GROUPBY(HSTACK(A2:A22,C2:C22),C2:C22,COUNTA,0,,,(D2:D22<>"")*(C2:C22="Private")))
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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