IF AND variables - guidance please.

I have 3 variables to check against, but some of them require other checks and I am getting lost. See file attached; this is a follow-on query and relates to rows 22-35. I have included in the spreadsheet an image of the calculations I am trying to automate. I believe i need to validate in the order i have labelled them in the image - 3 cases. In essence I am trying to derive an S value for the 3 cases. I haven't built Eq1 because i though i could build it into an IF statement but now i am not too sure. Hope this makes sense.
Who is Participating?
Ejgil HedegaardCommented:
The calculation for y1 in D33 use the upwind equation A.5, but the value in the formula must be the downwind z/L value from D24, for X/L=0 (x1), not the value in D16 from upwind.
y2 is calculated in D34 for X/L=0.1 (x2).
It is correct, but you can remove a lot of the parentheses, to make it easier to read.
Excel use standard mathematics rules, where addition and subtraction has higher priority then multiplication and division.

The interpolation in D35 must be reversed.
x1=0 and x2=0.1 are constants due to definition, so no need to refer to E33 and E34.
Both are in the formula for easy reference to the linear interpolation equation.

First check result is 0
Second check value calculated in D29
Third check value (interpolation) in D35

Result in D37
I have marked changed with yellow.
Martin LissOlder than dirtCommented:
I've never used it but you might want to consider Matchcad.
"addition and subtraction has higher priority then multiplication and division."
Isn't that backwards?  6*7+5*3 will be evaluated as (6*7) + (5*3).
Martin LissOlder than dirtCommented:
That’s correct. The order is
exponents and roots,
multiplication and division,
addition and subtraction.
vipamanAuthor Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.