Counting another sheet multiple criteria

jtallman

New Member
Joined
Nov 21, 2021
Messages
1
Office Version
  1. 365
Platform
  1. Windows
I have three sheets ("Input Data", "Count", "Summary Data").

I want Summary Data to have a value in S1 that contains a location ID ("01","02", etc). Summary Data will also have a date value in S2.

Input Data has location ID in column E ("01", "02", etc.). Input Data has delivery date/time in Column C ("11/20/2021 9:45:00 PM").

The Count sheet is used to count various values found in Input Data in columns J and P.

Count sheet has three columns with formulas that count the data in Input Data successfully. However, I want to now only count this data if the location ID and the delivery date match what is in Summary Data (S1=Location, S2=Date).

Count Sheet - Column E
=COUNTIF('Input Data'!P:P,Count!A2)

Count Sheet - Column F
=COUNTIF('Input Data'!P:P,Count!A2 & "," & "*")

Count Sheet - Column G
=SUMPRODUCT( -- ('Input Data'!$J:$J=A2),'Input Data'!$F:$F)

These formulas above work perfectly to count the data but I'm struggling on how to now filter these so that it only counts the data if the location and data selected in the Summary Data sheet match.

I've played with COUNTIFS but get a SPILL error when I added additional criteria.

Any help would be appreciated!
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

Forum statistics

Threads
1,215,055
Messages
6,122,902
Members
449,097
Latest member
dbomb1414

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