You can use the goalSeek() method in order to find a value for one cell that produces the desired formula result in another cell as shown in the code snippet shared below.
JavaScript |
Copy Code
|
---|---|
// This sample shows how to use the goal seek. // Loan amount is 10000, term is 18 months and pay 600 each month, evaluate what interest rate you will need to secure in order to meet your loan goal. sheet.setValue(0, 1, 10000); // Loan Amount |