Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Excel - Compute Third Field Given Two Others

Posted on 2016-08-18
4
Medium Priority
?
55 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
[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
  • Learn & ask questions
4 Comments
 
LVL 47

Assisted Solution

by:Wayne Taylor (webtubbs)
Wayne Taylor (webtubbs) earned 332 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 332 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 23

Assisted Solution

by:yo_bee
yo_bee earned 332 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 1004 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

718 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