# 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.
2nd-check.xlsx
###### Who is Participating?

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Older than dirtCommented:
I've never used it but you might want to consider Matchcad.
0
Commented:
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.
vipaman-2nd-check.xlsx
0

Experts Exchange Solution brought to you by

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Commented:
"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).
0
Older than dirtCommented:
That’s correct. The order is
exponents and roots,
multiplication and division,