Using Array Constants in Formulas again – OR logic

If you like this post please share it!
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

print
This is a short PS post to my earlier post on using Array Constants in Formulas basically to simplify them.   The focus of the earlier post was avoiding Nested IFs but what about simplifying OR logic situations.

Try…

=OR(B5={“A”,”B”,”D”})

will return TRUE if B5 = A or B or D.  This is a lot simpler and easier to maintain than =OR(B5=”A”,B5=”B”,B5=”D”) – ok yes it’s short for 3 values and not such an apparent improvement, but imagine if you had 20 lengthy values.  You can wrap this within a IF statement to return something you want other than TRUE or FALSE like a value or formula.

 

 

Tagged with: , , ,