Formula: Identify & sum multiple date ranges that include given date

MisterProzilla

Active Member
Joined
Nov 12, 2015
Messages
264
Hi there,

Not sure if the title of this question explains it very well...

I have members of staff who work 'fractions' (which are actually decimals, but never mind, HR). I need to identify which fraction they work on a particular date. Some work multiple fractions simultaneously. I need a formula that looks up a single date in a table of fraction date ranges, and sums the fraction values of all applicable/active date ranges on that date.

I have a fraction date range table in my Calendar sheet with start dates in column AA, End dates in column AB, and the fraction values in AC.

I have this formula which finds a single fraction, where E28 is the date I'm looking up:
=LOOKUP(2,1/(Calendar!AA35:AA39<=E28)/(Calendar!AB35:AB39>=E28),Calendar!AC35:AC39)

However, when multiple fractions are active, it only returns the lowest in the table. How would I modify this to sum the results where multiple fractions are active?


Thanks for reading, any help would be much appreciated :)
 
Last edited:

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
try this

Code:
=SUMIFS(Calendar!AC35:AC39,Calendar!AA35:AA39,"<="&E28,Calendar!AB35:AB39,">="&E28)
 
Upvote 0

Forum statistics

Threads
1,223,884
Messages
6,175,174
Members
452,615
Latest member
bogeys2birdies

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