Counting Date range across the whole workbook

PCloadletter

New Member
Joined
May 14, 2020
Messages
15
Office Version
  1. 365
  2. 2016
  3. 2010
Platform
  1. Windows
Hello,

I'm trying to figure out the formula for counting certain date ranges across the entire workbook. I was able to figure out the formula to do it from ONE sheet :

=SUMPRODUCT(COUNTIFS(SHEET1!Q:Q,">="&SUMMARY!C16,SHEET1!Q:Q,"<="&SUMMARY!C17))

Now I want to do it across all sheets, so I created a new sheet named "Sites" and listed all the sites from A1:A25. On my summary sheet for C16 to C17, I have the date range Jan 1st 2020 to Jun 30th, 2020.

=SUMPRODUCT(COUNTIFS(INDIRECT('Sites'!A1:A25,">="&SUMMARY!C16,'SITES'!A1:A25,"<="&SUMMARY!C17))

I thought this would work as it did for counting non-date values but I'm getting a "Too many Arguments" error.

Q:Q above would have date ranges on all my sheets.

Any help would be greatly appreciated.

Thank you in advance.
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
The formula works for me. I have the same date range in both Sheet1 and Sheet2.

Book2
ABC
1Sheet1!Q1:Q710
2Sheet2!Q1:Q74
312
48
Sites
Cell Formulas
RangeFormula
C1C1=SUMPRODUCT(COUNTIFS(INDIRECT(Sites!A1:A2),">="&Summary!C16))
C2C2=SUMPRODUCT(COUNTIFS(INDIRECT(Sites!A1:A2),"<="&Summary!C16))
C3C3=SUMPRODUCT(COUNTIFS(INDIRECT(Sites!A1:A2),"<="&Summary!C17))
C4C4=SUMPRODUCT(COUNTIFS(INDIRECT(Sites!A1:A2),">="&Summary!C16,INDIRECT(Sites!A1:A2),"<="&Summary!C17))


dates.png
 
Upvote 0
Thank you! I added the range for my sheets and the second indirect command and it worked!
 
Upvote 0

Forum statistics

Threads
1,215,047
Messages
6,122,858
Members
449,096
Latest member
Erald

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