IN

Checks if a value matches the values within a given list or array of values and returns TRUE if it matches.

The IN function returns TRUE if the specified value matches any of the values in the list or array. It returns FALSE if the value does not correspond to any item in the list. It is frequently used alongside IF and other conditional functions to simplify multiple OR conditions.

Syntax

IN(value,[item1,item2,...])

Arguments

value - The value to check. Required.

[item1, item2,...] - A list (array) of values to compare against. Required.

Return value

Either TRUE or FALSE.

Example

IF(IN([Sub Category],['Juices','Soda','Mineral Water']),30500000,0)

In this example, values are assigned to the 2027 Plan using the IN function within an IF statement.

The IN function checks the 'Sub Category' value and returns TRUE only when it matches any one in the specified list - Juices, Soda, and Mineral Water. The formula returns 30.5m for records where the Sub Category is Juices, Soda, or Mineral Water and 0 for all other subcategories.

Applying IN function

Last updated

Was this helpful?