How to create a group-by sum grouped by a date column?

Mr. Snrub

Board Regular
Joined
May 22, 2005
Messages
147
Office Version
  1. 365
Platform
  1. Windows
My worksheet has the following structure:

Code:
Date           Amount
4/9/2015    28.5810426
4/9/2015    114.3087462
4/9/2015     428.638518
4/23/2015   28.5803476
4/23/2015   114.3097186
4/23/2015   428.6390738
4/24/2015   169.02827915

I want a function that will allow me to create two more columns, one for the date, and other for the sum of the amounts for that date, like so:

Code:
Date        Amount
4/9/2015  571.5283068
4/23/2015  571.5283068
4/24/2015  169.02827915

How do I do this?
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Easiest way is with a pivot table. Select your range, from the Insert tab click Pivot table. Click OK, then from the PivotTable Fields dialog, drag Date to the Rows box, and Amount to the Values box. Done.

Next best is to create a list of unique values. You can use the Advanced Filter to do that, or there are formulas. Then use the SUMIF function.

Let me know if this works, or if you need additional assistance.
 
Upvote 0
I want whatever will be the most minimal effect on my workbook's memory. I thought that PivotTables were a real bear on your workbook's memory and speed. Please give more details of the second solution.
 
Upvote 0
Given that your unique values are dates, and therefore numbers, you can use SMALL to generate the unique list.

Excel 2012
A
B
C
D
E
F
1
Date
Amount
Date
Total Amount
2
4/9/2015
28.58104
4/9/2015
571.5283
3
4/9/2015
114.3087
4/23/2015
571.5291
4
4/9/2015
428.6385
4/24/2015
169.0283
5
4/23/2015
28.58035
6
4/23/2015
114.3097
7
4/23/2015
428.6391
8
4/24/2015
169.0283

<tbody>
</tbody>
Sheet1


Worksheet Formulas
Cell
Formula
E2
=IFERROR(SMALL($A$2:$A$8,COUNTIF($A$2:$A$8,"<="&MAX($E$1:E1))+1),"")
F2
=IF(E2="","",SUMIF($A$2:$A$8,E2,$B$2:$B$8))

<tbody>
</tbody>

<tbody>
</tbody>



Put the headings in E1:F1, then put the formulas in E2:F2, change the values to match your sheet, then copy down the column as far as needed.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,213,550
Messages
6,114,265
Members
448,558
Latest member
aivin

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