Equation into Excel using PEMDAS

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
=(-(g^6) * hpo^6 - 18 * g^3 * Pmax^2 -54 * hpo^4 * Pmax^4 + 6*SQRT(3) * SQRT(1*g^3 * hpo^9 * Pmax^6 + 27 * hpo^8 * Pmax^8))^1/3
 
Upvote 0
Oops:

=(-(g^6) * hpo^6 - 18 * g^3 * Pmax^2 - 54 * hpo^4 * Pmax^4 + 6 * SQRT(3) * SQRT(2 * g^3 * hpo^9 * Pmax^6 + 27 * hpo^8 * Pmax^8))^(1/3)
 
Upvote 0
Thanks you. I will give this a try and see how it works. If you don't mind, how would you do something a little more complicated like equation A12. Now that I have the Z(Pmax,hpo) formula, I would just select the cell that it's in but how would you write A12 using PEMDAS?
 
Upvote 0
How about you try and I'll review?
 
Upvote 0
A12 = (-g(^2)/3*Pmax)) - ((-(g^4*hpo^4)-12*g*hpo^3*Pmax^2)/3*hpo^2*Pmax*Z(Pmax,hpo)) - (Z(Pmax,hpo)/3*hpo^2*Pmax) ?
 
Upvote 0
Does it work? Plug in some numbers (ideally, some for which you know the result) and watch it evaluate using the Evaluate Formula button on the Formula Auditing toolbar.

Note that Z is a function defined by formula A13, so that should just be a cell reference.
 
Upvote 0
I tried it again with (-(g^2)/3*Pmax)) - ((-(g^4*hpo^4)-12*g*hpo^3*Pmax^2)/3*hpo^2*Pmax*Z(Pmax,hpo)) - (Z(Pmax,hpo)/3*hpo^2*Pmax) but it keeps giving me the wrong number. Been trying this for about a week now and it is getting really frustrating.
 
Upvote 0
Unless you've written a user-defined function named Z, that won't give you anything but a #NAME? error.

This

=(-(g^2)/3*Pmax)

should be

=(-(g^2)/(3*Pmax))

because the Pmax is in the denominator.

Excel's precedence of operators is

– (Parentheses)
– Reference (i.e., the colon in A1:B1, the comma in (A1, B1), and the space in (B2:C5 B4:E6))
– Unary Negation (=-3^2 returns 9, not -9)
– Percentage
– Exponentiation
– Multiplication & Division
– Addition & Subtraction
– Catenation (A1 & B1)
– Comparison
– Left to Right among equivalents

So 2/3*5 is is the same as 5*2/3. If you want the 5 in the denominator you need parens:

2/(3*5)
 
Last edited:
Upvote 0
Well I used the Z equation in another cell and just referenced it in the other equation but last week when I tried it, it gave me a ridiculously large number like 2 billion when it should be in the in the negative 1000 range. Using the equation I tried again, it gave me a positive number but it was only in the teens so I know the equation I tried was wrong. Never got the #name error though.
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,717
Members
448,985
Latest member
chocbudda

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