# Can I put formulas in 2 cells to calculate on each when information is input without getting a circular reference?

I'd like to make a calculation so that a user could choose to either input a % of time or actual hours. My current spreadsheet only calculates from % to hours. The user puts in cell B the % of a month a resource would be used and then cell A calculates that % into hours (eg, 20% of a person's time in the month of April = 33.6 hours).

I'd like the user to be able to place either % or hours but I, obviously, get a circular reference since the 2 cells would be calculating on each other. See attachment.

Is it possible to do this without a circular reference impeding calcualtions?
hours-to-percent-jag.xls
###### Who is Participating?

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Commented:
The only way you can achieve that (other than a VBA macro to check for cell changes) is to allow the user to enter the data on either A1 or B1 (for example) and place the formulas on line 2. So, line A2 would have the calculations for B1 and B2 would have the calculations for A1. You could then use A2 and B2 for the rest of your calculations.
If you just want to have two cells with the values, VBA is your only solution. Either a macro to check for changes and adjust the other accordingly, or a combination of MsgBox and InputBox to input the value, or a form to allow the choice and insert both values on the cells.
0
Commented:

Even if you *could* make them a circular reference, you wouldn't be able to achieve what you're trying to do without an event macro anyway, because entering any data in either cell would erase the formula in that cell.

Another suggestion would be to have one "Input" cell, and two cells with the result. A1 would be the user input, B1 always in hours, C1 always in percentage. The user would either put a number in hours in cell A1, e.g. "43", or specify a percentage by using the % sign, e.g. "22%".
0

Experts Exchange Solution brought to you by