Workaround for a circular reference in excel - excel-formula

I have a cash flow model forecast that I would like to reduce the ending balance by whatever the difference over $2,000 is by using financing activities but this causes an intended circular reference.
The image above is purely an example and we will assume that June on-wards is our forecast numbers and January to May is actual numbers.
To give context:
C11 = SUM(C7:C10),
C13 = SUM(C11,C4,C2),
C14 = B15 (its the ending balance from the prior month),
C15 = SUM(C13:C14),
C17 = IF(C15>=2000,C15-2000,0).
So from June G15 on-wards I'm forecasting we will always have more than $2,000 and I want to reduce $2,341 to $2,000 by adding it to G7 as a negative number. The formula in G7 will be:
-IF(G17>0,G17,0)
Which makes G11 $(341), G13 becomes $878, and G15 becomes $2,000 Yay!... but here alas is my circular reference because when you press F9 G17 becomes 0 and it all reverts back to what it was before.
Ultimately I'm trying to change row 15 in the forecast period by using row 15 in the first pass.
I should mention that I have iterative calculation turned on to allow the calculation to run.
Every month where I forecast over $2,000 I want to pay of some debt in Row 7 by whatever amount is over $2,000 but in the same month, then carryover the $2,000 or whatever is the balance to the next month and repeat the process.
So initially by June ending I forecast $2,341, then I decide the $341 goes to pay some debt in the same June leaving me with only $2,000 by end of June.
I carryover the 2,000 to July and add it to H14 and if I am below $2,000 no debt pay down just carryover to the next month until I am above $2,00 again and then pay down debt
I would appreciate suggestions on how to do that. Let me know if more clarification is needed.
Maybe some VBA?
Thanks

Related

How to evenly distribute growth to each month?

Assume my Dec'2020 revenue is 1000. My total 2021 revenue forecast is 15000.
I turned this into a monthly revenue increase evenly distributing the growth.
I set every month equals to their previous month PLUS a number(currently blank) throughout the 2021.
Then I have a SUM() formula to total every month of 2021.
I would then use goal seek to set the SUM to 15000 and change the value of the "number".
Results look like this
This has produced the desire result.
However, I am wondering if there's a faster way to do this? I would need this in a formula that I can simply drag over and get the results.
I have tried PMT formula with no luck.
Not sure if I understand what you after correctly, but here is my attempt:
Suppose you have the following named ranges:
Rev_Fcst being the forecast revenue for the next year which is 15,000 in your example;
Rev_Mth0 being the starting revenue of Month zero which is 1,000 in your case;
Rev_Growth being a dollar value of monthly revenue growth, and in your assumption this figure is fixed across the 12 months.
Suppose your data is in Column A:M being the 13 months from Dec-2020 to Dec-2021,
Use this formula to calculate Rev_Growth:
=(Rev_Fcst-Rev_Mth0*COLUMNS($A$1:$M$1))/SUMPRODUCT(ROW($1:$12))
Suppose the revenue of Month Zero Dec-2020 is in Cell A2, then in Cell B2 enter the following formula, then drag it across all the way to Month Dec-2021.
=A2+Rev_Growth
See below demonstration:
Let me know if you have any questions. Cheers :)

How to get a bill to populate with the amount, only if the particular payday falls exactly on or 6 days before the due date?

=IF(AND(DATE(YEAR(EE$2),MONTH(EE$2)+IF($B6<DAY(EE$2),1,0),DAY($B6))>=EE$2,DATE(YEAR(EE$2),MONTH(EE$2)+IF($B6<DAY(EE$2),1,0),DAY($B6))<EE$2+14),470,”")
Using Google Sheets to make a budget (See attached image snapshots). I’m a little bit stuck on a complex spreadsheet formula (listed above). What I’m trying to do is get a bill to populate with the amount, only if the particular payday falls exactly on or 6 days before the due date. Here’s what I’m working with:
Column Headers: I have set these cells so that they auto-populate with the payday, which happens every week on Friday.
Row 6 and 7 are where I want the amount to show up. I’ve been having to put them in manually, but I’d like to automate it for the length of the bill (60 months)
Column B, cells (B6 & B7) are set with a plain text number corresponding to the day of the month it’s due (i.e. 5th of each month for the Ford). So B6 cell has number 5 in it.
If the due date for the Ford Car Payment is the 5th of every month, I need the number $470 to populate into the cell if the date above the column is the 5th of the month or minus 6 days from it. Because the bill doesn’t always fall on a payday, as in the in EE or EF Column, it needs to populate with $470 on the EE6 cell to make sure the bill is paid on time.
Essentially, I want to be able to paste the formula into the 6th row, and have it only populate on the pay date closest 5th of each month, but not after the 5th. If it returns 0 like on cell ED6, the cell should remain blank.
Any ideas how I can make this possible?
=IF(ISNUMBER(MATCH($B5, ArrayFormula(DAY(C$3+{0,1,2,3,4,5,6})), 0)), 470, "")
Using C3 as the start assuming your calendar days start at C3.
The way this works is:
ArrayFormula(C$3+{1,2,3,4,5,6}) Generates a synthetic Range of dates starting at the date in C3 and the week following
ArrayFormula(DAY(C$3+{1,2,3,4,5,6})) just extracts the day's number of the month from all the dates. A date range from 2017-01-28 - 2017-02-03 would leave you with {28, 29, 30, 31, 01, 02, 03}
MATCH($B5, <2>, 0) Will try to find the Due month-day in the month-day list we just generated and return the position or an error if it is not there.
ISNUMBER(<3>) will be TRUE if the day is contained, otherwise false
IF(<4>, 470, "") Prints the payment on the correct dates, of course you can change 470 to a cell reference like $ZZ5.
You can drag this formula right and down

Excel Date table to determine next Bi-annual date from Input date

I am creating a Table in excel to help determine what the Bi-annual dates would be from an input date.
Example: If the start date of an agreement is 9/1/2017 and Ends 8/31/2018, the Bi-annual dates would be 2/28/18 and 8/31/2018. Dates of service would be 2 months before the end of the agreement period, and six months before the second service date (so 6/30/2018 and 12/31/2017 respectively).
Formula for this:
=IF(ISBLANK(O3), "",IF(EOMONTH(A1, 0)=EOMONTH(O3, -2), "BIANNUAL", IF(EOMONTH(A1, 0)=EOMONTH(O3, -8), "BIANNUAL", "")))
Where A1 refers to January, B1 would be February, and so on thru to December (L1). O3 is the Agreement End Date box, and will be static on the sheet. This formula work perfect for me.
What I am trying to get is a formula for the cells at the top that list the months (Jan-Dec). I need a formula that will put the date as 1/31/2018 for Jan, 2/28/2018 for Feb, 9/30/2017 for September (for the current year since September has not passed). The actual day needs to be the last day of the month, and if that month has passed, then the year should be for next year. I have been playing with the DATE function, but cannot get it nailed down.
What I have so far - January 2018:
=DATE(YEAR(TODAY()+365), MONTH(42766), DAY(EOMONTH(42766, 0)))
This works, but not each month will be in 2018. I need the year to change only after the month has passed.
I feel like I'm either over complicating things, or I need a way more complex formula. Please help.
In A1 place the following formula and copy right to L1 or as far as you need to go
=EOMONTH($O$2,COLUMN(A1)-1)
It will display the end of month dates starting with the starting month of the contract and increasing by 1 month for each column you move right.
In the image below, it is the same formula in row 1 and row 2. Row one I choose custom format instead of date and set the custom format to mmmm. 4 m's will give you the full month, and 3 m's will give you the 3 starting letters of the month.
I actually figured this out this morning just playing with the IF function. My goal was to have the sheet update itself without having to change the dates every time your open it. So that the file could be shared with others and all you would have to enter is the end of the contract date, and it will list out Biannual, Tri-annual, and Quarterly months (see image).
Formula:
=IF(DATE(YEAR(TODAY()), MONTH(42766), DAY(EOMONTH(42766, 0)))<TODAY(), DATE(YEAR(TODAY()+365), MONTH(42766), DAY(EOMONTH(42766, 0))), DATE(YEAR(TODAY()), MONTH(42766), DAY(EOMONTH(42766, 0))))
Where I used the serial for each month (in this case 1/31/2017, as I didn't need to worry about the year)
Results

Calculate the number of biweekly pays in 1 month

To create a monthly budget in Google Sheets, biweekly pay needs to be calculated. Some months there are three paydays and some there are two. Paydays are every second Wednesday night.
The below formula worked previously, and now it does not.
Before being rounded, the formula calculates to =ROUNDDOWN(1.14)*1000 which multiplies the pay amount by one except there is never only one payday in a month. This month there are two pay days, 14/09/16 and 28/09/16.
=ROUNDDOWN((EOMONTH(TODAY(),0)-(MOD(DATE(2016,8,31)-DATE(YEAR(TODAY()),MONTH(TODAY()),1),14)+DATE(YEAR(TODAY()),MONTH(TODAY()),1)))/14)*1000
Where is the error in my formula?
Consider this formula:
=(INT((EOMONTH(TODAY(),0)-DATE(2016,8,31))/14)-INT((EOMONTH(TODAY(),-1)-DATE(2016,8,31))/14))*1000
It calculates all the paydays from the end of the current month back to your date of 8/31/2016 and subtracts all the paydays from the prior month back to the same date.
In march of 2017 it will give the correct 3 paydays.

Take me to next pay period end date?

I'm trying to create a formula that will take me to the next pay period end date.
For example, if the employee's leave of absence is going to go unpaid effective 1-1-15, I want a formula that will tell me when the last day of the pay period is for 1-1-15. We have biweekly pay periods.
Step 1: define your pay periods.
In your case, it seems pay periods are simply every other week, always on the same day of the week. You may get away with simply writing a formula that checks to see if the target date rounds into a number divisible by 14; however in the case of a holiday (which may push the payment into the prior day or the following Monday depending on holdiay), I recommend creating a list manually.
To do this, go to a new sheet (let's say Sheet2). On A1, write the date of the last pay period which just happened. Then on A2 and drag down, use the formula:
=A1+14
However, after dragging this down to the end of the year, I recommend that you go back and manually confirm that each date is appropriate (ie: are there any special cases?
Step 2
Use a lookup formula to check which pay period a date falls into. Here I'll assume a simple case, where Sheet1 A1 contains the date that an employee begins unpaid leave, and Sheet1 B1 will contain the pay period which that date falls into:
=VLOOKUP(A1,'Sheet2'!A:A,1,1)
This will look for the value in A1 on Sheet2 - if it falls on the exact day, it will spit it back to you. If it doesn't fall on the exact day, it will give you the next closest date after that [make sure this rounds the way you want; I couldn't quite get a sense of the actual response you wanted].

Resources