How to use Excel to automatically add interest to a total daily - excel

I can't find my answer anywhere, but believe it's a simple solution. I need Excel to automatically calculate the daily interest on an amount (which will go up and down with deposits and withdrawals), and then add it to the total, to display the overall total including interest (compounding). This will change daily when someone looks at the value in Excel due to the daily interest being added.
For example. I have $5000. At 5% APR, the daily interest rate would be .0137%. The day after the $5000 is there, the new total should show $5000.68 if I opened and looked at the spreadsheet. If didn't check the spreadsheet, then on day 2, the total should show $5001.37. If I added $5000 more to the total on day 2 (after interest was added) I would then have $10001.37 and the interest rate for the next day should automatically add on to the new total, compounding daily.
Sample spreadsheet with today as 12/10/22, needing to have total balance update daily
Essentially, I want a spreadsheet that can display the overall balance in an account which compounds daily, allowing withdrawals and deposits at anytime [H2]. How do I accomplish this!?

If you have interest starting date then could use below formula-
=(B2*0.0137%)*(TODAY()-A1)
Here A1 cell is interest starting date.
To see total with interest can use-
=B2+(B2*0.0137%)*(TODAY()-A1)

Make a named value called DailyInterest with a value of 1.000137.
Then make a table like this...
Date
Change
Amount
5/5/2022
$5,000.00
0
Then highlight it and click Insert Table from the ribbon.
Tables will give you a few benefits, some cosmetic, but the one I want to show you is that you can define a formula for a column, and it's ONE formula. It doesn't get copied down to each row, it just seems that way, but the reality is that the formula stored once, internally, and applied to every row.
So, then, change that amount of 0 with
=IFERROR(OFFSET([#Amount],-1,0)*POWER(DailyInterest,[#DATE]-OFFSET([#Date],-1,0),0)+N([#Change])
Within the table, [#Date] refers to the value in the Date column for that row.
I used N() so that nonvalues in the Change column are treated as zeroes.
Now, each time you fill in the Date and Change column, the Amount column will be automatically populated.

Related

excel sumproduct formula calculating time

hello dear forum members and admins,
i created a dashboard to calculate customer numbers based on raw data prepared on day and time set.
there is no problem here I can calculate. but I also want to calculate the monthly average customer numbers based on the time set. for this purpose, I created a data table in a daily_pax_sheet. for e.g in January between 10:00 - 10:30 CUSTOMERS E totally number is 35 and this 35 amount occurred in 8 days, then it calculates 4 amounts. in daily_pax_details sheet row 107 formula firstly calculate sum of the data then it divides the day number (for e.g this amount occurs in 8 days) but in some cases, raw data include more than 20k line and it's calculating and waiting too much. is there any other way to do it in a quick way ? how can I change this formula to make calculation quick ?
https://docs.google.com/spreadsheets/d/1y-2Ke2ssskzSM-wYszU54CIEraPbEX4X/edit#gid=459027650
UPDATE: thanks for the idea and solution from members
I also realized another solution and I think it will help other people in the future. we can get the data to the pivot table with counting the unique values with changing field settings. To do it you should get the data pivot table with selecting "add this data to the data model". then changing value field settings with the "Distinct value". hope it will help another pppl.
Your SUMIFS formulas use whole columns as criteria, so every calculation checks more than 1 million cells. And because you use more than 1 column, then every time you update *anything in the file, Excel checks more than 4 million cells because of your formulas...
I changed all to use the righ rawdata range of cells used, not whole columns. And now it works perfect.
As example, your formula is:
=SUMIFS('raw data'!$R:$R;'raw data'!$D:$D;'Daily customer'!C$3;'raw data'!$I:$I;'Daily customer'!$A4)
And I changed to:
=SUMIFS('raw data'!$R$2:$R$2461;'raw data'!$D$2:$D$2461;'Daily customer'!C$3;'raw data'!$I$2:$I$2461;'Daily customer'!$A4)
Because in your sheet raw data your data goes from row 2 to 2461, so in every calculation Excel checks only 2460 cells, not 1 million....
Change all your formulas like this and you should notice a better performance indeed.
UPDATE: I've uploaded the modified file: https://docs.google.com/spreadsheets/d/11isonBHFJTFFWtZTJg66JHbtyrD0XFGl/edit?usp=sharing&ouid=114417674018837700466&rtpof=true&sd=true
It works smoothly for me. No lag or anything. I can change any cell value, move the graph, filter cells and everything is done almost instantly.

Formula which subtracts a cell value from a total based on the date

I am trying to create a budget sheet with a formula that essentially deducts an amount due from the total outstanding based on today's date and the dates each amount is due. So what I am trying to achieve is, for example, in the image link below. So for example, if I access the sheet on the 10th May, I would see the total amount due less the amounts due on 1st and 8th May as these dates have passed
If you want to include current date (i.e. the same date as today) as outstanding then use following formula:
=SUMIF(A2:A5,">="&TODAY(),B2:B5)
If you do not want to include then drop equal to symbol
=SUMIF(A2:A5,">"&TODAY(),B2:B5)

Excel - Take Average of Monthly Data

I have a historical data set for commodity pricing. Throughout the data set, the data starts inputting prices on specific days, rather than the average of the entire month. In order to keep the flow of having only the average pricing for the months.
In the best case scenario, I would use an Averageif function, however, the data for each month doesn't display a consistent amount of days.
How can I automate this the process: If the month is the same as the previous row and different than the next row, calculate the average of the ^ rows until you hit the next month.
Here's a simple display of what I mean:
]1
You can use a pivot table to get the output you want. It will also be neatly organized instead of having your averages mixed in with a mostly blank column. Photo below shows the set-up/output of a pivot table generated with random data.
For a solution without pivot tables, you can use the following formula :
=AVERAGEIFS($B$1:$B$30;$A$1:$A$30;">="&(A1-DAY(A1)+1);$A$1:$A$30;"<="&EOMONTH(A1;0))
The above example is from cell C1, and can be copied down the entire list. The dates are in $A$1:$A$30 and the values in $B$1:$B$30. The first conditions test on the first day of the month (calculated as A1-DAY(A1)+1),and the second condition as last day of the month (calculated as EOMONTH(A1;0)
This will obviously put the average value of the month on each row, but will also work if your data is not sorted on date. If this is the case, and you only want to display one number per month in the column (as in your own example), you can add an additional IF statement wrapped around the formula:
=IF(EOMONTH(A2;0)=EOMONTH(A1;0);"";AVERAGEIFS($B$1:$B$30;$A$1:$A$30;">="&(A1-DAY(A1)+1);$A$1:$A$30;"<="&EOMONTH(A1;0)))
So it will display empty in all cells, except where the month changes.

how to summarize total hours worked by an employee per week based on the schedule

I have an excel sheet with 3 sheets. The second sheet is a list of permutation/combination of employee and the possible shifts they can work and hours they get.
The first sheet has a monthly calendar view. For each calendar day they are select from the list from second sheet
I want the their sheet to display number of total hours each employee is scheduled to worked based on sheet 2 numbers ( column B)
Awesome scheduler ... I made one just like it a couple of years ago but will additional reporting pages that would break down the total hours by standard pay, OT pay, and holiday pay, then with that information calculate their gross pay.
I recreated a basic version of what you have pictured above and then put together two different methods for calculating the total hours per week per employee based on the schedule.
The first way is the simpler way that makes each calculation individually and then totals them on the back end. To do so you will use the 'countif' function for each shift for each person (the range is the whole calendar and the , then multiply by the corresponding number of hours per shift on the 2nd page.
Then in the next column you see I merged the cells next these subtotals, and wrote a 'sum' formula to total the subtotals for each shift totals in column J. This approach is easier to put together and easier to diagnose issues with as you are working on it.
The 2nd method I used is more complicated as it nests these functions into a single operation using the 'sum' and then several iterations of the 'countif' within it.
If you really want to get fancy you could go another step further and put together an array formula, but they are a bit more tricky.
Depending on how meticulous you are about having innocuous data, I added an additional condition on mine that would leave the totals cells blank if someone didn't work, just because I don't like to see the '0' when I was reviewing the back end report.
Hope this helps.

Date Dependant Calculation

I've got a (Excel) sheet with running totals of income and expenses. The data from each day is fed into a weekly running total. I also have monthly expenses that I would like to include into the weekly total expense count/profit count but don't want to put each category of monthly expenses into each day's or week's input fields.
I would like to keep the monthly expenses in it's own input field but add the data to the corresponding week the bills were paid.
I've been at this for weeks but can only find solutions that end with circular references. Bonus challanges: I'm pretty happy with the size of each input field and don't want to add any more fields nor do I want to do macros or any VBA. I really just want a formula to take care of it.
Is there a way to have Excel stop adding to a total after a certain day?
Link to the sheet. https://drive.google.com/file/d/0B5qCnQJhT_vkNHZlaEpnTGRtUjQ/view?usp=sharing
it seems like you are entering your expense directly into your "dashboard" am I right? E.g. the rent 875 in cell H13. If this is the case, without a date, then you can't get Excel to intelligently place the expense to the correct week report in your dashboard.
try creating an input table and all your dashboard figures should come from the input table, utilizing functions like SUMIFS and SUMIF.
Example
Then in your dashboard
formula in H13 would be =SUMIFS(E:E,C:C,"Rent",D:D,"Check")
formula in G4, =SUMIFS(E:E,C:C,"Food",D:D,"Cash")
formula in D23, =SUMIFS(E:E,B:B,51,C:C,"Rent",D:D,"Cash")

Resources