CONTAINS function

The Klipfolio CONTAINS function tests each value in the haystack element to see if it contains the value in the needle element.

The syntax for the CONTAINS function is:

CONTAINS( haystack , needle )


haystack the values to test vector
needle the value to match vector

CONTAINS example

Let's look at a CONTAINS function example.




1 orange 10
2 apple 12
3 apple 12
4 orange 10

The following example is based on the above text from an Excel spreadsheet:

SELECT( B:B , ( CONTAINS( A:A , "orange" ))) 

-> [10, 10]

Related links: