Hi all
Just tried the With example from Microsofts documentation page showing a simple payments calculator, but all I get is a blank label. Not getting any errors and the formula is referencing to my three sliders. Feel I'm missing the elephant in the room somehow.
Hi timl
Thank you so much, must familiarise myself with both the Slider and the With function a lot more, as they both seem very useful.
It took me a while to figure that out - there's actually a bug with that code sample!
The Years assignment at the top should be YearsSlider.Value. The original code causes a divide by zero error.
The following should hopefully work for you.
With( { AnnualRate: RateSlider/8/100, // slider moves in 1/8th increments and convert to decimal
Amount: AmountSlider*10000, // slider moves by 10,000 increment
Years: YearsSlider.Value, // slider moves in single year increments, no adjustment required
AnnualPayments: 12 }, // number of payments per year
With( { r: AnnualRate/AnnualPayments, // interest rate
P: Amount, // loan amount
n: Years*AnnualPayments }, // number of payments
r*P / (1 - (1+r)^-n) // standard interest calculation
)
)
So I literally did a copy and paste. from Here
With( { AnnualRate: RateSlider/8/100, // slider moves in 1/8th increments and convert to decimal
Amount: AmountSlider*10000, // slider moves by 10,000 increment
Years: YearsSlider, // slider moves in single year increments, no adjustment required
AnnualPayments: 12 }, // number of payments per year
With( { r: AnnualRate/AnnualPayments, // interest rate
P: Amount, // loan amount
n: Years*AnnualPayments }, // number of payments
r*P / (1 - (1+r)^-n) // standard interest calculation
)
)
WarrenBelz
146,605
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,946
Most Valuable Professional