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
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?
Question by:jag4
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.

Accepted Solution

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%".

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
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…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

803 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