Skip to main content

Formula (IF + OR)

  • July 12, 2023
  • 1 reply
  • 11 views

Forum|alt.badge.img+5

Hi there!
I am trying to create a formula that looks at an entry (single select) and if that entry is = A, B or C say "Blabla" and if it says anything else say "Haha".

I have hence tried to nest OR() into IF() as followed:

IF(entry=OR("A", "B","C"), "Blabla", "Haha")

I am not shown any error but the formula result is wrong (It says "Haha" when it should say "Blabla').

Any thoughts?

1 reply

Forum|alt.badge.img+21
  • Inspiring
  • 560 replies
  • July 12, 2023

Hi @Marika_Vallier 
Let's try the formula "OR("A", "B", "C")". The result should be 1.
With your formula, "Blabla" would only be obtained if "Entry=1".

It can be written in various ways, but if the SWITCH function is used, it will look like this.

IF( SWITCH(ENTRY, "A",1, "B",1, "C",1, 0 ), "Blabla", "hal" )