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
310 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

735 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