Solved

Excel - Compute Third Field Given Two Others

Posted on 2016-08-18
4
51 Views
Last Modified: 2016-08-22
I know how to do this programmatically but I wonder if I can do this using only formulas... it's not obvious to me.

Referring to the image below, I want to be able to calculate the field with no entry when the other two are filled in.
 
The overall formula is Cap Rate = Income / Price... so if someone enters income and price, I'll compute the cap rate, if they enter cap rate and price, I'll compute compute income and so on.
 
At this point, the only way I can see to do it is to have a second set of fields below the first that contain the formulas.  Any other thoughts or am I going to have to add a "Compute" button and a chunk of VBA code?

TIA
 
missing.png
0
Comment
Question by:Wayne Herbert
4 Comments
 
LVL 47

Assisted Solution

by:Wayne Taylor (webtubbs)
Wayne Taylor (webtubbs) earned 83 total points
ID: 41761749
You could have a formula in each of the 3 cells (which will result in a circular reference), then the user will only have to enter 2 of the 3 values. But that will be a one time thing as the formula will disappear once a value is entered. You will need to do as you thought and use the 2nd set of fields, or VBA.
0
 
LVL 12

Assisted Solution

by:tel2
tel2 earned 83 total points
ID: 41761752
Assuming that people who aren't named "Wayne" can also participate in this...

Would hiding that 2nd set of fields, and putting them to the right of the visible 3, make them any more tolerable, Wayne (Herbert)?
0
 
LVL 22

Assisted Solution

by:yo_bee
yo_bee earned 83 total points
ID: 41761832
You can create a table with three headings Price, Income, Cap. With Price have the formula and as you tab down the formatting and formulas carry down.

Is that what you want to do.
0
 
LVL 27

Accepted Solution

by:
Glenn Ray earned 251 total points
ID: 41765555
Without VBA, you'll need to have a separate range to display the resulting calculated value.  There are two approaches:
1) have an identical set of cells ("fields" as you described them) with formulas designed to display the inputted and calculated values
2) have a single cell that dynamically labels the calculated field and provides the calculation.

One can add some functionality by both testing the input conditions to ensure that at least two values are input, AND using Conditional Formatting to show that the result is proper.

I've attached a workbook that demonstrates both examples.  In the first, if there are not two (2) values in the Input cells, then the bottom section will turn black and a message "Cannot Calculate" will appear. In the second, there is only one box that shows the value to be calculated and will also display "Cannot Calculate" if there are not two input values.

VBA would let you do all this with one set of Input/Result cells.

Regards,
Glenn
EE_Q_28964252.xlsx
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
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.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

776 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