If statement? AND/OR

1110
1
Jump to solution
07-13-2017 07:06 AM
KaraHarmet
New Contributor III

I want to write an if statement that determines whether a scale is calibrated properly. I have been trying different 'if statements' and none of them seem to be working in excel. The if statement in English: If any of the 4 corners have a difference of 0.2 compared to the center, the scale needs to be re-calibrated. I have attached what I have been working with so far. Lines 184-203 are the relevant lines to this situation. I am having trouble with the syntax. If someone could show me how the structure of an If/OR statement works in excel or an If/AND statement it would be greatly appreciated. I can't seem to find a concrete example online. I get a validation error whenever I try to run the survey.

0 Kudos
1 Solution

Accepted Solutions
KaraHarmet
New Contributor III

I figured it out! it was just syntax/formatting. Anyway the generic template would be:

if(${var1} < ${varA}*2 and ${var2} < ${varA}*2 and ${var3} < ${varA}*2, 'True', 'False')

This statement says if variables 1, 2, and 3 all are less than variable A * 2, the return is true. If any one of those variables are greater than variable A * 2 the the return is false.

View solution in original post

0 Kudos
1 Reply
KaraHarmet
New Contributor III

I figured it out! it was just syntax/formatting. Anyway the generic template would be:

if(${var1} < ${varA}*2 and ${var2} < ${varA}*2 and ${var3} < ${varA}*2, 'True', 'False')

This statement says if variables 1, 2, and 3 all are less than variable A * 2, the return is true. If any one of those variables are greater than variable A * 2 the the return is false.

0 Kudos