Dynamic Formula

gregmpenn

New Member
Joined
Apr 21, 2023
Messages
7
Office Version
  1. 365
Platform
  1. Windows
Is there a way to create something of a dynamic formula in excel that works in dual directions?
For example, down payment amount (in dollars) vs. down payment percentage.
I have a calculator that you can input a percentage and it’ll give you the dollar amount of a purchase price.
Example:
$400,000 purchase x’s .0020 = $80,000.

Cell A: $400,000
Cell B: %
Cell C: (sum/formula cell)

Cell C is essentially dependent on cells A and B.
Is there a way, though, to make cell B dependent on cells A & C at the same time?
So, that if I change the dollar amount in C, it’ll update the percentage in B? AND vice versa?

Right now I can only get the amount based on the percentage, but the percentage cell obviously doesn’t change when I update the amount cell.
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
If I understand the ask I'd say no. First, if you edit C you will wipe out the formula. Second, if you could employ your idea it would create what's known as a circular reference (where a value depends on another value but the other value depends on the first value). The only way I can see being able to come close to what you want would be to use vba, and a userform would make more sense than trying to do it on a sheet.
 
Upvote 0
Given this is a 3 variable equation, I don't think there is a possible solution if 2 variables are unknown. Excel will need to recognize if the input value is a percentage or a $ amount since there can only be 1 variable to reach a solution (this is a mathematics issue not excel limitation). People with more knowledge can confirm if that's true or not however I'm not aware of a way.

I think you can make it work if you include a field to answer that question. There are 2 input fields: The value and the variable identifier. Based on those, the formulas can recognize how to solve the equation. The formulas in the example below assume the purchase price is always an input. Based on whether or not the input type is a $ or %, the A3 and A4 will know which formula to use to solve for the other variable.

Book1
ABCDEFGHIJK
2Purchase price400,000Purchase price400,000
3Down payment %20%Input typeDown Payment $Down payment %20%Input typeDown Payment %
4Down payment $80,000Input amount80,000Down payment $80,000Input amount20.0%
Sheet1
Cell Formulas
RangeFormula
B3,H3B3=IF(E3="Down Payment $",B4/B2,IF(E3="Down Payment %",E4))
B4,H4B4=IF(E3="Down Payment $",E4,IF(E3="Down Payment %",B2*B3))
 
Upvote 0
A thought to remove the second input field for the variable type is that the formula in B3 and B4 could be modified so that if the input value in E4 is less than 1 then the formula will treat it as a percentage and if it is greater than 1 then it treated as a $ amount
 
Upvote 0
All that rings true, and as I see it, is a matter of logic. If this, then that. If this but not this, then something else; etc. That's why I see vba as the solution but I have nothing concrete to offer at this point because what has been revealed doesn't lend itself to suggesting anything definitive.
 
Upvote 0

Forum statistics

Threads
1,215,076
Messages
6,122,983
Members
449,092
Latest member
Mr Hughes

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