Forum Discussion
Can you automate goal seek in excel
Hi ecveryone, is it possible to automate goal seek?
11 Replies
- JoeUser2004Bronze Contributor
[.... deleted ....]
Thanks Joe, I have corrected the link.
The Range object in Excel VBA has a hidden method GoalSeek. See GoalSeek Method [Excel 2003 VBA Language Reference]
It still works in Excel in Microsoft 365.
- Harun24HRBronze ContributorWrite formula as an alternative.
- robwill100Brass Contributor
Hi Harun, thank you for your reply. I have explained below what I am trying to achieve and I would appreciate your assistance in being able to write the required formula. I have attached the spreadsheet I am working on.
The overall objective is to calculate the brokerage percentage in cell H5.
To achieve this I am currently using the goal seek function.
Prior to using the goal seek function I first have to under the heading Customer:
- Input into cell D3 the amount of the loan.
- Input the term of the loan in years in cell D5
- Input the repayment amount per month into cell D7.
Once I have done that the annual interest rate for loan is shown in cell D4 where I have used the RATE formula.
Once I have completed that I then need to under the heading financier:
- Input the new interest in cell H11.
- At this point I use the goal seek function whereby I choose cell H12 followed by inputting into the “to Value” section the monthly pmt from cell D7. ($890 in this example) I then in the “by changing cell” choose cell H5. (brokerage percentage). The result of the goal seek then calculates the brokerage percentage.
If its possible to do this via a formula rather than using goal seek I would really appreciate your help.
Cheers
Rob
This is a possible formula:
=(PV(H11/12, H10, D8, 0, 1)-H7-Rental_Loan_Amount)/Rental_Loan_Amount
or
=(PV(H11/12, H10,D8,0, 1)-H7)/Rental_Loan_Amount-1