Dependent formulae

mrs_excel11

New Member
Joined
Jul 18, 2011
Messages
1
Hi,
I have two cells each of which has a multivariable formula in it to calculate price and yield. Amongst these variables are the price and the yield themselves. i.e. the price depends on the yield and the yield depends on the price. I am looking to create a system of two cells so that if I enter the value of the price into the "price cell", the value of the yield is returned, and if I enter the value yield into the "yield cell", the value of the price is returned. How do I integrate this into my sheet ? Your help would be most appreciated. Many thanks.
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
So - you have two formulas one says something like

Price=F(Yield)

And the other is

Yield=F(Price)

Any you want to do something so that if you enter price in one cell the second cell is populated with the calculated value of the yield and vice-versa?

You cant do this with a formula (obvioulsly) as it would be circular. How I would do is with a change event procedure that kicked off a procedure to calulate the value for the other cell and populate it any time either of the two cells are changed.

If you look here

http://www.cpearson.com/excel/Events.aspx

there is a load of information to get you started

But beware - as you will be changing a cell that will kick off an event procedure you could trigger an infinite loop which will crash your procedure. You have to set Application.EnableEvents to FALSE in your procedure before you change the cell and then set it to true again once you have done it to avoid this problem.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,599
Messages
6,179,828
Members
452,946
Latest member
JoseDavid

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