Date strategies in calculations

vbthedog

New Member
Joined
Jul 17, 2017
Messages
11
I am trying to work out a system of "Actual" versus "Budget" based on today's date. I have a column per month of expenses and at the bottom, it is totalled. Below that is a budget for that month for the entire column. As each day of the month progresses, I want the next cell down to show the % of total over or under budget for that month used to date.

So I need the cell to work on what number day of the current month it is to perform the calculation for this month, but then, once the month has finished (or even not yet started) stop calculating.

Make sense?

TIA

David
 
Last edited by a moderator:

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Hi vbthedog,

For my example I've used cell B1 as the date for test purposes. You can replace with =TODAY()

You said you only want to calculate for the current month so others are made null.

For the headings I've made each month the first of that month but displayed just the month name with format mmmm

Book1
ABCDEFGHIJKLM
1As at9/15/2020
2
31/1/20202/1/20203/1/20204/1/20205/1/20206/1/20207/1/20208/1/20209/1/202010/1/202011/1/202012/1/2020
4Allstate-Car424242424242424242000
5Allstate-House222222222222222222000
6AT&T393939393939393939000
7Broadband767676767676767676000
8Gas424242424242424242000
9Water/Power878787878787878787000
10Mortgage812812812812812812812812812000
11Other8080808024080808080000
12
13Total120012001200120013601200120012001200000
14Budget9001000100010001000100045010001000
15% over/under        140.00%   
Sheet1 (2)
Cell Formulas
RangeFormula
C3:M3C3=EOMONTH(B3,0)+1
B13:M13B13=SUM(B4:B11)
B15:M15B15=IF(OR($B$1<B$3,$B$1>EOMONTH(B$3,0)),"",(B13-(DAY($B$1)/(EOMONTH(B3,0)-B3+1))*B14)/((DAY($B$1)/((EOMONTH(B3,0)-B3)+1))*B14))
 
Upvote 0
Blimey I knew it might be tricky so thank you! The only difference is that after a month has completed,, I want the final +/- budget figure to stay fixed as a fixed value as it was at the month end.
 
Upvote 0
I only have Excel 2003 and cannot copy my test spreadsheet but this might give you some ideas from my test

Step 1. Enter Last day of previous month in cell H2 Last day current month I2

Step 2 In J2 get number of days for month “=SUM(I2-H2)”

Step 3 In K2 get daily budget figure “=Budget/J2)

Step 4 In F3:J3 enter these headings “Date,Days completed,Budget,Actual,%Difference”

Step 5 Enter Date in F4

Step 6 Formulae as follows

G4 =$J$2-SUM($I$2-F4) “DAYS”

H4 =$K$2*G4 “BUDGET”

I4 Expenditure to date from your spreadsheet

J4 =SUM(H4-I4)/H4 “% DIFF”

Step 6 Insert date and drag down formulae for each subsequent day of month
A screenshot
1578832917605.png
1578832917605.png
 
Upvote 0
Book1
ABCDEFGHIJKLM
1As at9/15/2020
2
31/1/20202/1/20203/1/20204/1/20205/1/20206/1/20207/1/20208/1/20209/1/202010/1/202011/1/202012/1/2020
4Allstate-Car424242424242424242000
5Allstate-House222222222222222222000
6AT&T393939393939393939000
7Broadband767676767676767676000
8Gas424242424242424242000
9Water/Power878787878787878787000
10Mortgage812812812812812812812812812000
11Other8080808024080808080000
12
13Total120012001200120013601200120012001200000
14Budget90060018001000100012008001000600
15% over/under33%100%-33%20%36%0%50%20%300%   
Sheet1 (3)
Cell Formulas
RangeFormula
C3:M3C3=EOMONTH(B3,0)+1
B13:M13B13=SUM(B4:B11)
B15:M15B15=IF(EOMONTH(B$3,0)<$B$1,(B13-B14)/B14,IFERROR((B13-(DAY($B$1)/(EOMONTH(B3,0)-B3+1))*B14)/((DAY($B$1)/((EOMONTH(B3,0)-B3)+1))*B14),""))
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,191
Members
452,616
Latest member
intern444

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