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

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,409
Messages
5,831,448
Members
430,069
Latest member
bubbleboom

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
Top