IF AND based on an input + or -

I can get this to work and in my head it should :)
I want an "In Spec" IF… the Stage 1 Temp Verification is less than or equal to S1 Temp minus 5 AND Stage 1 Temp Verification is great than or equal to S1 Temp plus 5.
=If([Stage 1 Temp Verification]@row) <=([S1: Temp]@row + 5), ([Stage 1 Temp Verification]@row) >= ([S1: Temp]@row - 5), "In Spec", "Out of Spec"))
Best Answer
-
You need an OR statement. The formula you wrote is interpreted as this:
IF Stage1 Temp Verification <= S1: Temp +5
THEN Stage1 Temp Verification >= S1: Temp -5
Both are logic checks, which is why it returns "unparseable value."
Try this instead:
=If(OR([Stage 1 Temp Verification]@row) <=([S1: Temp]@row + 5), ([Stage 1 Temp Verification]@row) >= ([S1: Temp]@row - 5)), "In Spec", "Out of Spec"))
Answers
-
You need an OR statement. The formula you wrote is interpreted as this:
IF Stage1 Temp Verification <= S1: Temp +5
THEN Stage1 Temp Verification >= S1: Temp -5
Both are logic checks, which is why it returns "unparseable value."
Try this instead:
=If(OR([Stage 1 Temp Verification]@row) <=([S1: Temp]@row + 5), ([Stage 1 Temp Verification]@row) >= ([S1: Temp]@row - 5)), "In Spec", "Out of Spec"))
-
Getting an unparseable in return.. looks like too many parenthesis maybe?
-
This cleans up some extraneous parens:
=If(OR([Stage 1 Temp Verification]@row <= ([S1: Temp]@row + 5), [Stage 1 Temp Verification]@row >= ([S1: Temp]@row - 5)), "In Spec", "Out of Spec")
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65.9K Get Help
- 429 Global Discussions
- 147 Industry Talk
- 487 Announcements
- 5.2K Ideas & Feature Requests
- 86 Brandfolder
- 151 Just for fun
- 74 Community Job Board
- 497 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 305 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!