- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
AND/OR statements in Formula Editor
Hi All,
I was hoping someone could help me with a formula containing AND/OR statements. I have written a formula in "Column 5" based on the results of 3 other columns: Run F, Run M, and Run S. The portions of the formula that only contain IF/THEN statements produce the desired results. However, the portions of the formula that also contain AND/OR statements do not work (non-working portions of the formula are circled in RED in the attached screen shot). The JMP file is also attached below. Can anyone please help on what I am doing wrong?
Thank you!
Erica
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: AND/OR statements in Formula Editor
Try this form and see if the logic works correctly
If(
:Run F == 1 | :Run M == 1, "Leave",
:Run F == 2, "Keep",
:Run F == 3, "Upscale",
(:Run F == 4 | :Run F == 5) & (:Run S == 1 | :Run S == 2), "Fix",
(:Run F == 4 | :Run F == 5) & (:Run S == 3 | :Run S == 4), "Encode",
:Run M == 2, "Upscale",
:Run M == 3 & (:Run S == 1 | :Run S == 2), "Fix",
:Run M == 3 & (:Run S == 3 | :Run S == 4), "Encode"
)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: AND/OR statements in Formula Editor
Try this form and see if the logic works correctly
If(
:Run F == 1 | :Run M == 1, "Leave",
:Run F == 2, "Keep",
:Run F == 3, "Upscale",
(:Run F == 4 | :Run F == 5) & (:Run S == 1 | :Run S == 2), "Fix",
(:Run F == 4 | :Run F == 5) & (:Run S == 3 | :Run S == 4), "Encode",
:Run M == 2, "Upscale",
:Run M == 3 & (:Run S == 1 | :Run S == 2), "Fix",
:Run M == 3 & (:Run S == 3 | :Run S == 4), "Encode"
)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: AND/OR statements in Formula Editor
That works perfectly!! Thank you so much, Txnelson!! I greatly appreciate your help!!