Skip to main content

IF Statements with OR and AND

  • June 7, 2019
  • 4 replies
  • 23 views

Forum|alt.badge.img+17

What is wrong here?

IF(AND({Tracking Number}=BLANK(),Qty!="",Commission=BLANK()),OR(AND(Upload=1,Commission=BLANK())),1)

I am still getting everywhere a 1

Please look on this screenshot

4 replies

Justin_Barrett
Forum|alt.badge.img+21

I’m guessing you want a 1 in the field if either of the AND collections come back as true, which is why you added the OR. However, the OR is in the wrong place. It needs to surround both of the AND functions:

IF(
    OR(
        AND(
            {Tracking Number}=BLANK(),
            Qty!="",
            Commission=BLANK()
        ),
        AND(
            Upload=1,
            Commission=BLANK()
        )
    ),
    1
)

Does that give you the result you want?


Forum|alt.badge.img+17
  • Author
  • Known Participant
  • June 7, 2019

Something is not good: Sorry, there was a problem saving this field. Invalid formula. Please check your formula text.


Justin_Barrett
Forum|alt.badge.img+21

Something is not good: Sorry, there was a problem saving this field. Invalid formula. Please check your formula text.


Not sure what the problem is. It works fine here:

Make sure you copied the full formula. Perhaps the closing parenthesis got chopped off during copying?


Forum|alt.badge.img+17
  • Author
  • Known Participant
  • June 7, 2019

Thank you Very much, it did work as you told me