Skip to main content
Question

Can a formula field IF check if a value is in a list of values?

  • February 16, 2019
  • 0 replies
  • 225 views

I have a formula field where I'd like to check if the value in a field is contained in a list of values
IF([Field1] in [1, 2, 5, 10], "Yes", "No")  
Is this possible somehow?_  If the value in Field1 is one of the values in my list (1, 2, 5, 10), then output "Yes", otherwise output "No"

Or do I need to put each line separately?
If([Field1] = 1, "Yes",     [Field1] = 2, "Yes",     [Field1] = 5, "Yes",     [Field1] = 10, "Yes",     "No")  
This topic has been closed for replies.

You are safer with the IF and listing all the values lie you did in our example.  The "Contains" function is really for text values and you will get messed up between for example, 1 and 10 where they both contain a 1.

With numeric values you should use the formula you suggested where the conditions are listed vertically.