Formula for daily total as day goes along?

ChetShannon

Board Regular
Joined
Jul 27, 2007
Messages
133
Office Version
  1. 365
Platform
  1. Windows
I have a workbook with 3 columns. #1 Date, #2 Time, #3 Amt_taken. I am trying to add a 4th column called Amt_taken_so_far. I am unable to calculate the 4th column.

This 4th column is just the sum of column #3 up to that time of the current day for that row. So the column 4 will show the incremental total as the day goes along and then reset for the next day. I am tracking how much food my cat has eaten and want to know as the day goes along the total as the day progresses how much he's eaten. I'm trying to come up with a formula to give me that. The problem has been that column1 and 2 have multiple days in them.
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
You did not say what row your data actually starts in, so assuming you have header cells in A1:D1, meaning the data of dates, times, and amounts taken start in row 2, then in cell D2 you can enter and copy down
VBA Code:
=IF(A2<>A3,SUMIF($A$2:A2,A2,$C$2:C2)-SUMIF($A$1:A1,A2,$D$1:D1),"")
 
Upvote 0
I'm wondering if this might be what you are after?

21 05 22.xlsm
ABCD
1DateTimeAmtDay Progress
220/05/20219:0033
320/05/202111:3069
420/05/202114:14514
520/05/202115:45115
620/05/202120:00419
721/05/20217:3022
821/05/202112:0135
921/05/202116:00510
1022/05/20210:5544
1122/05/20218:03711
Day Progress
Cell Formulas
RangeFormula
D2:D11D2=IF(A2=A1,D1+C2,C2)
 
Upvote 0
Solution
Thank you these were both great answers. I ended up using the simple (2nd one). I should have thought of it myself. :( Thank you!
 
Upvote 0
You're welcome. Glad we could help. Thanks for the follow-up. :)
 
Upvote 0

Forum statistics

Threads
1,215,044
Messages
6,122,827
Members
449,096
Latest member
Erald

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