CalvinWong

New Member
Joined
Jul 13, 2015
Messages
4
Hi all,

I have a set value in cell B1 that will be changed constantly.

Cell B7 has a formula written based on the values of cells B3, B4, and B5. The values in cell B3 and B5 do not change, meaning they are constant and will always be 4 and 10, respectively. Is it possible for Excel to automatically match the value in B7 with the value in B1, and give me the value of cell B4? In other words, can Excel change B7 to "500" and give the according height (B4)?

I am looking to do this without Goal seek and I believe an iterative calculation is the way to go, but I'm not exactly sure.

This is the formula inside of B7: =(PI()*B3*B3-B3*B3*ACOS((B3-B4)/B3)+(B3-B4)*SQRT(2*B3*B4-B4*B4))*B5

A
B
C
1
Volume
500
Cubic Feet
2
3
Radius
4
Feet
4
Height of Air
4
Feet
5
Length
10
Feet
6
7
Volume
251.327412
Cubic Feet

<tbody>
</tbody>


I have Excel 2010.

Thanks!
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Without being a math genius, I think the best method is Excel's Solver Add-in. After installing the add-in you can install the vba reference library and paste the following code into your worksheet.

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    Application.Calculation = xlCalculationAutomatic
    If IsError(Range("B7")) Then Range("B4") = 4
    If Target.Address <> "$B$1" Then Exit Sub
    solverreset
    SolverOk SetCell:="$B$7", MaxMinVal:=3, ValueOf:=Target.Value, ByChange:="$B$4", Engine _
        :=1, EngineDesc:="GRG Nonlinear"
    SolverOk SetCell:="$B$7", MaxMinVal:=3, ValueOf:=Target.Value, ByChange:="$B$4", Engine _
        :=1, EngineDesc:="GRG Nonlinear"
    SolverSolve True
End Sub

You will have to run the code manually once first, but this method is far more accurate than goal seek
 
Upvote 0
Without being a math genius, I think the best method is Excel's Solver Add-in. After installing the add-in you can install the vba reference library and paste the following code into your worksheet.

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    Application.Calculation = xlCalculationAutomatic
    If IsError(Range("B7")) Then Range("B4") = 4
    If Target.Address <> "$B$1" Then Exit Sub
    solverreset
    SolverOk SetCell:="$B$7", MaxMinVal:=3, ValueOf:=Target.Value, ByChange:="$B$4", Engine _
        :=1, EngineDesc:="GRG Nonlinear"
    SolverOk SetCell:="$B$7", MaxMinVal:=3, ValueOf:=Target.Value, ByChange:="$B$4", Engine _
        :=1, EngineDesc:="GRG Nonlinear"
    SolverSolve True
End Sub


You will have to run the code manually once first, but this method is far more accurate than goal seek

Is there a solution without using the Solver Add-in?
 
Upvote 0
I believe only if you can algebraically solve

B7=(PI()*B3*B3-B3*B3*ACOS((B3-B4)/B3)+(B3-B4)*SQRT(2*B3*B4-B4*B4))*B5

for B4, then you could enable iterration, but solving for B4 is beyond me.
 
Upvote 0
Is it possible for Excel to automatically match the value in B7 with the value in B1, and give me the value of cell B4? [....] This is the formula inside of B7:
=(PI()*B3*B3-B3*B3*ACOS((B3-B4)/B3)+(B3-B4)*SQRT(2*B3*B4-B4*B4))*B5

Is there a solution without using the Solver Add-in?

In simple terms, you want to know the height of a shape, given its radius, length and volume.

It might be helpful to know what the shape is.

For example, the volume of a cylinder is V = h*pi*r^2. So h = V/(pi*r^2).

I am having trouble imaging a shape that has both height and length as well as a radius.
 
Last edited:
Upvote 0
PS.....
I am having trouble imaging a shape that has both height and length as well as a radius.

Well, a cone has length (of side), height and radius. But the volume is simply V = h*pi*r^2/3.
 
Last edited:
Upvote 0
In simple terms, you want to know the height of a shape, given its radius, length and volume.

It might be helpful to know what the shape is.

For example, the volume of a cylinder is V = h*pi*r^2. So h = V/(pi*r^2).

I am having trouble imaging a shape that has both height and length as well as a radius.


Sorry, I should've stated in my original question the shape of the formula. It is a cylinder with flat ends on its side. There is liquid filling up inside the cylinder. The "height of air" is how much air is left between the liquid and top of the cylinder.
 
Upvote 0

Forum statistics

Threads
1,214,989
Messages
6,122,622
Members
449,093
Latest member
catterz66

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top