Summarizing bi-weekly data into years

michaeljc70

New Member
Joined
Nov 23, 2015
Messages
4
I have data I exported that has expenses on a bi-weekly basis. It contains 3 years+current year. It looks like this (condensed):

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD][TABLE="width: 132"]
<tbody>[TR]
[TD="width: 132"][/TD]
[TD="width: 132"]1/1/2016- 1/15/2016[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD].....[/TD]
[TD]8/16/2019- 8/31/2019[/TD]
[TD]9/1/2019- 9/15/2019[/TD]
[TD]9/16/2019- 9/25/2019[/TD]
[/TR]
[TR]
[TD]Expense 1[/TD]
[TD]500[/TD]
[TD][/TD]
[TD]300[/TD]
[TD]600[/TD]
[TD]700[/TD]
[/TR]
[TR]
[TD]Expense 2[/TD]
[TD]200[/TD]
[TD][/TD]
[TD]250[/TD]
[TD]225[/TD]
[TD]275[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

Expected Results
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]2017[/TD]
[TD]2018[/TD]
[TD]2019[/TD]
[/TR]
[TR]
[TD]Expense 1[/TD]
[TD]xxx[/TD]
[TD]yyy[/TD]
[TD]zzz[/TD]
[/TR]
[TR]
[TD]Expense 2[/TD]
[TD]aaa[/TD]
[TD]bbb[/TD]
[TD]ccc[/TD]
[/TR]
</tbody>[/TABLE]

Note that 2017 would be 9/26/2016-9/25/2017.
What I need is a summary of expenses for the last 3 years. 9/26/2018-9/25/2019, 9/26/2017-9/25/2018 and 9/26/2016-9/25/2017.

I can think of a few ways to do this in a roundabout way, but I am looking for the easiest/most direct. I would probably add a row of formulas that gives each column a year (if it will be used) and then pivot it. Is this the best approach? I will be redoing this frequently with new data so the end date can change but there will always be 3+ years of bi-weekly data.
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
I added 2 rows.

Row 1 = your dates
B2 =YEAR(DATEVALUE(LEFT(B1,FIND("-",B1)-1)))
B3 =YEAR(DATEVALUE(TRIM(MID(B1,FIND("-",B1)+1,11))))

B12 = 2017, C12 = 2018
A13 = Expense 1
B13 = =SUMIFS(4:4,$2:$2,B$12,$3:$3,B$12)


That SUMS the year if the start and end date are in the year, so may need to be modified
 
Upvote 0

Forum statistics

Threads
1,224,822
Messages
6,181,165
Members
453,021
Latest member
Justyna P

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