Summing across date bands

smapple

New Member
Joined
Jan 15, 2018
Messages
6
Hello,

I'm sure this is fairly straightforward, but I ended up doing a manual workaround that I'm keen to avoid in the future.

I have three columns of data. I want to know what the exposure was over each day, where the 'To' and 'From' dates are inclusive. For example, on the 3 January, the exposure would be 150 + 200 + 100 = 450. As you can see, the dates often overlap, which made the manual process pretty painful.

Is there a way, using VBA or a formula, to automate this? I tried concatenating the To/From fields and using a SumIfs but I got lost with the date convention. The convention I'm using is dd/mm/yy in my spreadsheet.

Many thanks for your help.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Exposure[/TD]
[TD]To[/TD]
[TD]From[/TD]
[/TR]
[TR]
[TD]150[/TD]
[TD]1 Jan 2018[/TD]
[TD]5 Jan 2018[/TD]
[/TR]
[TR]
[TD]200[/TD]
[TD]3 Jan 2018[/TD]
[TD]10 Jan 2018[/TD]
[/TR]
[TR]
[TD]220[/TD]
[TD]12 Jan 2018[/TD]
[TD]31 Jan 2018[/TD]
[/TR]
[TR]
[TD]80[/TD]
[TD]15 Jan 2018[/TD]
[TD]31 Jan 2018[/TD]
[/TR]
[TR]
[TD]100[/TD]
[TD]1 Jan 2018[/TD]
[TD]31 Jan 2018[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop

Forum statistics

Threads
1,223,227
Messages
6,170,853
Members
452,361
Latest member
d3ad3y3

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