• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 38
  • Last Modified:

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
0
vipaman
Asked:
vipaman
1 Solution
 
Martin LissRetired ProgrammerCommented:
I've never used it but you might want to consider Matchcad.
0
 
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.
vipaman-2nd-check.xlsx
0
 
CompProbSolvCommented:
"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
 
Martin LissRetired ProgrammerCommented:
That’s correct. The order is
exponents and roots,
multiplication and division,
addition and subtraction.
0
 
vipamanAuthor Commented:
Excellent!
0

Join & Write a Comment

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now