February 22, 200718 yr Hello, I've searched around, but I haven't found a solution for my problem. I need to be able to find the unknown in an equation when all other variables are known. for example: if A+B=C and I know B and C, I want A to automatically calculate. The tricky part is that I'm hoping to be able to have the A,B, and C fields empty and typing the values into any two will produce a result in the third. For example: Fields A, B, and C are blank. If I type 2 into Field A and 5 into Field C, Field B will show 3. If I delete the 5 from Field C and put a 4 in Field B, I want Field C to automatically show 6. Is this possible? If not, is there a close workaround? The calculations will be used in Time Value of money equations. The real variables will be Principal (Future Value), Interest Rate, Terms (in Years), and Monthly payment. Thanks in advance for your help1 Sol Edited February 22, 200718 yr by Guest
February 22, 200718 yr You can put an auto-enter on each field: A uses C-B B uses C-A C uses A+B One problem is that I think FM 7 had a bug with doing this, but it seems to work okay in 8.5.
February 22, 200718 yr It would probably be easier to just use one calculation... Otherwise you'll need a script to clear the fields
February 22, 200718 yr Author Hi Shadow, Thanks for the reply. I'm actually using 8.5 (I guess I didn't update the profile...). Anyways, I tried using the Auto-enter. That seems intuitive, but when I put a value into a blank field, the field goes blank as soon as I go to the next field. What am I missing? Thanks for your help. Sol
February 22, 200718 yr Author Thanks Rod for uploading the file. Your solution is remarkably simple and is a good workaround if I can't get it to work without clearing the fields. I'll play around with it. Sol
February 22, 200718 yr change the field to a calculation field, it will then update fie field, and then change it back to Auto Enter. HTH Lee [color:red]p.s. Try this on a copy of the file Edited February 22, 200718 yr by Guest p.s.
February 22, 200718 yr Author Thanks Lee. That worked 1 time, but I need it to evaluate over and over again. I want to be able to do "What If" scenarios. For example: What if A was 1 and B was 3; OK C is 4. Now what if I change B to 4; OK C is 5. Hope that is more clear.
February 22, 200718 yr The problem here is that: starting point: A = 1 ; B = 3 ; C = 4 if you change B to 4, then the possible results are two: 1) A = 1 ; B = 4 ; C = 5 or 2) A = 0 ; B = 4 ; C = 4
February 22, 200718 yr Author Good point Ray. I was thinking about that and trying to figure out a way to provide a radio button that says "Solving for:" whichever value. In that case, the calculation would reference the radio field in a Case statement. For example: Case (Radio = "A"; Solve for A; Radio = "B"; solve for B; Radio = "C"; solve for C; default). That way the equation wouldn't be stuck with not knowing which variable is the one that needs to be changed. Do you think that using something like this could provide the answer?
February 22, 200718 yr How about something like this that use the technique of Mikhail Edoshin and Matthew Petrowsky's enhancements with the technique. AutoValues.zip
February 23, 200718 yr I hate when I overcomplicate things. I had been looking at their techniques for something similar to what they did, and I guess that was on my mind and I wasnt thinking. My head has been in la-la-land all day. Thanks for the correction and reality check Comment.
February 23, 200718 yr Hi comment if the "solve for" value must be fixed, I think that this is better ! : unknown.zip
February 23, 200718 yr Hmmm... I have C selected, and I modify B - and I see A getting adjusted. I don't think you can achieve what I think you are trying to achieve, for the reasons explained in your first post. I actually did something like this a long time ago, but I chose a different approach altogether (sceenshot attached).
February 23, 200718 yr Hmmm... I have C selected, and I modify B - and I see A getting adjusted. Isn't that what he wish and what my file do ? Fix C Set A Obtain B Fix A Set B Obtain C Fix A Set C Obtain B ... and so on ? ... for the reasons explained in your first post. with a value fixed, the result is only one.
February 23, 200718 yr I thought the 'solve for' field is the one that is supposed to change. If instead you want the field to be 'fixed', then suppose C is selected, and I modify C - I see A getting modified, although it could just as well be B. I know that what I do is not reasonable, but it is possible, so why not? It only shows that this type of user interface is, at least partially, 'undefined'.
February 26, 200718 yr Author Thanks Mr. Vodka! That's exactly what I needed. This is a great technique, and I'm sure I'll be using it a lot in the future. Sol
Create an account or sign in to comment