Solved

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

Posted on 2012-03-22
313 Views
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
0
Question by:jag4
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points

LVL 18

Assisted Solution

Cluskitt earned 250 total points
ID: 37753709
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

LVL 3

Accepted Solution

DaFranker earned 250 total points
ID: 37753819

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

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

### Suggested Solutions

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
###### Suggested Courses
Course of the Month3 days, 11 hours left to enroll