Anyone maths please?

excelos

Well-known Member
Joined
Sep 25, 2011
Messages
591
Office Version
  1. 365
Platform
  1. Windows
hello!

I want to insert this equation to Excel:
g9DdZBB.png


I came up with this (obviously, P = I7 cell, etc)
=(I7*6*sqrt(J7)*(1.99-J7*(1-J7)*(2.145-3.93*J7+2.70*J7^2)))/(F7*sqrt(G7)*(1-2*J7)*(1-J7)^1.5)

What could be wrong in the above function?

Thanks!
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
You probably need to consider the order of operations..

^ is calculated first
* and / are next
and +- are last

putting calcs in () will override that order, anything in () is done first.

Example
(F7*sqrt(G7)*(1-2*J7)*(1-J7)^1.5)
1-J7 will be done first, and the result of that will then be applied to ^1.5

If you intended the ^1.5 to be done last, 'after' all the multiplications, then you would do
((F7*sqrt(G7)*(1-2*J7)*(1-J7))^1.5)

That way, all of this is done first
F7*sqrt(G7)*(1-2*J7)*(1-J7)
Then that result is applied to ^1.5
 
Upvote 0
ok, I get a result of 30686883 with those values.
What result are you expecting?

I'd suggest using the Formula evaluation tool on the Formulas tab, and watch the calculations happen 1 step at a time.
I'm failry sure the issue is with the order of calculations.
 
Upvote 0
You probably need to consider the order of operations..

^ is calculated first
* and / are next
and +- are last

putting calcs in () will override that order, anything in () is done first.

Example
(F7*sqrt(G7)*(1-2*J7)*(1-J7)^1.5)
1-J7 will be done first, and the result of that will then be applied to ^1.5

If you intended the ^1.5 to be done last, 'after' all the multiplications, then you would do
((F7*sqrt(G7)*(1-2*J7)*(1-J7))^1.5)

That way, all of this is done first
F7*sqrt(G7)*(1-2*J7)*(1-J7)
Then that result is applied to ^1.5

I think I am happy to do the powers first, then the multiplications/divisions and last the additions/substractions.
I think that's what the correct maths imply, when we write an equation and that's what should be applied to the equation.
 
Upvote 0
The ^ was just an example...
Here's another possible issue

2.145-3.93*J7+2.70*J7^2

Using brackets to illustrate, this is the order that would be calculated
(2.145-(3.93*J7))+(2.70*(J7^2))

Is that the way you're expecting ?
 
Upvote 0

Forum statistics

Threads
1,215,022
Messages
6,122,716
Members
449,093
Latest member
Mnur

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