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
2
303 Views
Last Modified: 2012-05-16
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
Comment
Question by:jag4
2 Comments
 
LVL 18

Assisted Solution

by:Cluskitt
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

by:
DaFranker earned 250 total points
ID: 37753819
In addition to Cluskitt's answer:

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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
The new Microsoft OS looks great, is easier than ever to upgrade to, it is even free.  So what's the catch?  If you don't change the privacy settings, Microsoft will, in accordance with the (EULA) you clicked okay to without reading, collect all the…
Viewers will learn the basics of slicers and timelines for both PivotTables and standard Excel tables in Excel 2013.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now