sum based on date

hitch_hiker

Active Member
Joined
Feb 21, 2012
Messages
294
I have column"A" holds sequential dates in random instances, (might be any number 1 through to 30 or even more), against each date is a value in column"B", which I need to sum. e.g. sum all for 1 july , sum all for 2 july etc. I really don't want to go through 365 filter for date then sum. Is there an easy or standard way of doing this. Note, I might need to do this across several years so the instances could easily get out of hand.
reportdatetotal sales
2000​
1/07/2018​
854.25​
newcastle
1/07/2018​
351.00​
gosford
1/07/2018​
557.00​
1,762.25​
=sum(c4:c6)
2001​
2/07/2018​
254.00​
inv2529
2/07/2018​
587.79​
inv2530
2/07/2018​
67.17​
inv2531
2/07/2018​
67.17​
inv2562
2/07/2018​
545.79​
inv2566
2/07/2018​
269.50​
inv2576
2/07/2018​
509.52​
2300.94​
=sum(c7:c13)
2002​
3/07/2018​
132.04​
inv2538
3/07/2018​
305.14​
437.18​
=sum(c14:c15)
2003​
4/07/2018​
215.44​
inv2569
4/07/2018​
112.00​
2004​
5/07/2018​
259.85​
inv2546
5/07/2018​
167.93​
inv2557
5/07/2018​
276.52​
inv2553
5/07/2018​
294.00​
2005​
6/07/2018​
290.75​
inv2550
6/07/2018​
374.71​
inv2551
6/07/2018​
191.91​
inv2588
6/07/2018​
454.86​
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Try this:
Book1
ABCDEF
2reportdatetotal sales
3
420007/1/2018854.25 
5newcastle7/1/2018351 
6gosford7/1/20185571,762.251762.25
720017/2/2018254 
8inv25297/2/2018587.79 
9inv25307/2/201867.17 
10inv25317/2/201867.17 
11inv25627/2/2018545.79 
12inv25667/2/2018269.5 
13inv25767/2/2018509.522300.942300.94
1420027/3/2018132.04 
15inv25387/3/2018305.14437.18437.18
1620037/4/2018215.44 
17inv25697/4/2018112327.44
1820047/5/2018259.85 
19inv25467/5/2018167.93 
20inv25577/5/2018276.52 
21inv25537/5/2018294998.3
2220057/6/2018290.75 
23inv25507/6/2018374.71 
24inv25517/6/2018191.91 
25inv25887/6/2018454.861312.23
26
Sheet3
Cell Formulas
RangeFormula
E4:E25E4=IF(B4<>B5,SUMIFS($C$4:$C$25,$B$4:$B$25,B4),"")
 
Upvote 0
Thanks Maabadi,
so I need to change the range to suit the sheet (952 rows), does that mean sumifs($c$4:$c$952, $b$4 ....... >>>> $b$952) ?
 
Upvote 0
Yes Changed Row Numbers & Column Letter Based of Data Range then Drag formula Down.
if your first row data is 4 then try this:
Excel Formula:
IF(B4<>B5,SUMIFS($C$4:$C$952,$B$4:$B$952,B4),"")
Otherwise change 4 to first row number & 5 to Second Row number
 
Upvote 0
You can try Excel's Subtotal; it will prepare a summary for you
1 is Grand Total
2 by each change
3 original detail and subtotal
I show the sum by change - 2
Select the Range
Use Data Outline Subtotal
at each change of date
sum
You do not enter the formulas.

N.B. You can post an extract of your sheet with the forum's tool XL2BB.

reportdatetotal sales
1-Jul-18 Total1762.25
2-Jul-18 Total2300.94
3-Jul-18 Total437.18
4-Jul-18 Total327.44
5-Jul-18 Total998.3
6-Jul-18 Total1312.23
Grand Total7138.34
 
Upvote 0
Solution
You can try Excel's Subtotal; it will prepare a summary for you
1 is Grand Total
2 by each change
3 original detail and subtotal
I show the sum by change - 2
Select the Range
Use Data Outline Subtotal
at each change of date
sum
You do not enter the formulas.

N.B. You can post an extract of your sheet with the forum's tool XL2BB.

Thanks Dave,
I'm not sure how to do this, however I have every confidence I can play around as well as consult the help files. I think this will be easier and easier is always the best answer

 
Upvote 0

Forum statistics

Threads
1,214,940
Messages
6,122,352
Members
449,080
Latest member
Armadillos

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