Summarize Weeks into Month

seguin85

Active Member
Joined
Mar 17, 2015
Messages
278
Office Version
  1. 365
Platform
  1. Windows
Hi All,

I have some data by week set up similar to:
5/22/175/29/176/5/176/12/176/19/176/26/177/3/177/10/177/17/17
Amount100020002000400040004000400020002000

<tbody>
</tbody>

And I would like it to be summarized by month to:
5/1/176/1/177/1/17
Amount200040004000

<tbody>
</tbody>

So essentially it returns the max value that happens in that month and year. I am hoping to do this without using an array formula.
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
I'm not sure if this is possible using a non-array formula. Here is an array formula for you to consider:


Excel 2010
ABCDEFGHIJ
15/22/20175/29/20176/5/20176/12/20176/19/20176/26/20177/3/20177/10/20177/17/2017
2Amount100020002000400040004000400020002000
3
4
55/1/20176/1/20177/1/2017
6Amount200040004000
Sheet1
Cell Formulas
RangeFormula
B6{=MAX(IF(DATE(YEAR($B$1:$J$1),MONTH($B$1:$J$1),1)=B5,$B$2:$J$2))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
could try doing it with the Aggregate function...

Unknown
ABCDEFGHIJ
15/22/20175/29/20176/5/20176/12/20176/19/20176/26/20177/3/20177/10/20177/17/2017
2Amount100020002000400040004000400020002000
3
45/1/20176/1/20177/1/2017
5Amount200040004000

<tbody>
</tbody>
Sheet1

Worksheet Formulas
CellFormula
B5=AGGREGATE(14,6,$B$2:$J$2/(DATE(YEAR($B$1:$J$1),MONTH($B$1:$J$1),1)=B4),1)

<tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0
could try doing it with the Aggregate function...

Unknown
ABCDEFGHIJ
15/22/20175/29/20176/5/20176/12/20176/19/20176/26/20177/3/20177/10/20177/17/2017
2Amount100020002000400040004000400020002000
3
45/1/20176/1/20177/1/2017
5Amount200040004000

<tbody>
</tbody>
Sheet1

Worksheet Formulas
CellFormula
B5=AGGREGATE(14,6,$B$2:$J$2/(DATE(YEAR($B$1:$J$1),MONTH($B$1:$J$1),1)=B4),1)

<tbody>
</tbody>

<tbody>
</tbody>

Nice, I didn't think of that.
 
Upvote 0
I've never even heard of the aggregate function. How does it affect the performance? I have to use it in a bunch of areas throughout the file and don't want it to slow down too much.
 
Upvote 0
its more efficient than the MAX IF, how efficient I couldn't tell you, because it would depend on what else you have going on in your workbook.
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,750
Members
448,989
Latest member
mariah3

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