Sum between two dates

Gusher

Board Regular
Joined
Aug 21, 2011
Messages
207
Office Version
  1. 365
Platform
  1. Windows
In cell A1 I have a date, in cell A2 I have another later date. In column B I have dates and in column C and D I have numbers. I need a function to return the sum of the numbers in cols C and D between the dates specified in cells A1 and A2.

Many thanks
 
Last edited:
You're welcome.

It's partially just a way to pass time.
But mostly I find helping other people is a great way to learn, and keep your skills sharp.
I'm usually answering about stuff I already know, but I do come accross issues I don't immediately know the solution to, and that pushes me to figure it out. Thus expanding my own knowledge.
 
Last edited:
Upvote 0

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
You're welcome.

It's partially just a way to pass time.
But mostly I find helping other people is a great way to learn, and keep your skills sharp.
I'm usually answering about stuff I already know, but I do come accross issues I don't immediately know the solution to, and that pushes me to figure it out. Thus expanding my own knowledge.

Hello Jonmo1,


I have another question please. The formula you helped me with has to read data from 40 different exel sheet so the formula is different 40 times which is tedious to edit. The data cells are in identical positions on all the sheets. All the sheets are named. So I wondered if it is possible in a column to create a list of sheet names, for example A1 to A40. Then in column B1 to B40 I have the formula you gave me but in each formula points to the adjacent cell in col A to get the sheet name for the formula. Many Thanks , Mark
 
Upvote 0
You can use INDIRECT for that

=SUMPRODUCT((INDIRECT("'"&H1&"'!B1:B100")>=A1)*(INDIRECT("'"&H1&"'!B1:B100")<=A2)*INDIRECT("'"&H1&"'!c1:c100"))

Where H1 is a cell containing the sheetname.
 
Upvote 0
You can use INDIRECT for that

=SUMPRODUCT((INDIRECT("'"&H1&"'!B1:B100")>=A1)*(INDIRECT("'"&H1&"'!B1:B100")<=A2)*INDIRECT("'"&H1&"'!c1:c100"))

Where H1 is a cell containing the sheetname.


Thanks, and any thoughts on how I can create a list of sheet names in a column?
 
Upvote 0
That's going to require VBA, and there are lots of threads on that already.
Try searching the forum for create list of sheet names.
 
Upvote 0

Forum statistics

Threads
1,224,827
Messages
6,181,199
Members
453,022
Latest member
RobertV1609

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