It might be complicated to calculate complex equations. There might not be enough time to leave the "f" value alone. This process can be made very easy with following steps in this page.
Complex Equation Solving in Excel
Friction coefficient is a value that is used in pressure drop calculation in pipes. Formula for the friction coefficient is as below.
It might be problematic to find the friction factor from this equation. In order to make this process less complicated, you can follow the steps below or download the excel file on the right, so you can find any unknown value with ease.
Step by Step Complex Equation Solver in Excel:
Complex Equation Solver Excel:
Step 1:
We fill the cells that where we want each one of the variables.
Step 2:
In "A2" cell we enter the value that as shown on top we'd like to calculate. This value could be anything at the start.
In "B2" cell we enter the left side of the equation in excel format and in "C2" cell right side of the equation.
Step 3:
Now in "D2" cell we enter the formula as shown below.
For English Excel;
=SIGN(C2-B2)
For Turkish Excel;
=İŞARET(C2-B2)
After that according to your "A2" cell value, this sign will be "+1" if it's positive, "-1" if it's negative when you subtract left side of the equation from right side of the equation. Reason for this will be explained later.
Step 4:
In "B5" cell, enter a starting value for the value you'd like to calculate, in "B6" end value and in "B7" step value. The macro will start from the start value and keep going until it's at the end value by the step you entered.
Step 5:
Now it's time for a little bit of coding. If you've not worked with Excel Macro, you can activate "Developer" tab as; File --> Options --> Customize Ribbon --> Activate Developer on the right side.
Step 6:
Now let's add a button that will activate our software. Assignment of macro to button will be done later. Developer --> Add --> Button
Step 7:
Now we'll assign a new macro to the button. Right Click the button --> Assign a Macro --> Enter Macro Name --> This Workbook --> New
Step 8:
We add the below coding between "Sub Formula()" and "End Sub". What every line means explained on their right side.
Sub Formula()
sign_value = Range("D2").Value 'Define if the sign is "+" or "-".
For i = Range("B5").Value To Range("B6").Value Step Range("B7").Value 'We loop the macro from the start point("B5") to end point"(B6") with step value ("B7")
Range("A2").Value = i 'Value that will be calculated entered in "A2".
If sign_value <> Range("D2").Value Then ' Before jumping to the next value we calculate if the sign has changed.
End 'If the sign changed, macro stops.
End If 'Stop the if loop.
Next i 'Go to next "i" value
End Sub
Click save button and exit the macro screen. Now whenever we click the start button, start value will be entered to "A2" cell and with the desired step value macro will keep going until sign has changed. Changing sign means both sides of the equations are now equal to each other and you've found the "f" value.