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):

1/1/2016- 1/15/2016

<tbody>
</tbody>
.....8/16/2019- 8/31/20199/1/2019- 9/15/20199/16/2019- 9/25/2019
Expense 1500300600700
Expense 2200250225275

<tbody>
</tbody>

Expected Results
201720182019
Expense 1xxxyyyzzz
Expense 2aaabbbccc

<tbody>
</tbody>

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.
 

Some videos you may like

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)

mrshl9898

Well-known Member
Joined
Feb 6, 2012
Messages
1,194
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
 

Watch MrExcel Video

Forum statistics

Threads
1,099,122
Messages
5,466,818
Members
406,500
Latest member
Tknotmaxx

This Week's Hot Topics

Top