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 a specified value matches any value in a list or array. It returns FALSE if no match is found. It is commonly used with IF and other conditional functions to simplify multiple OR conditions.

Syntax

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

Arguments

  • value: The value to check.

  • item1, item2, ...: A required list of values to compare against.

Return value

Returns TRUE if a match is found; otherwise, returns FALSE.

Example

IF(IN(Sub Category,["Juices", 'Soda']), 52640000, 0)

In this example, the IN function is used within an IF statement to assign values to the 2027 Actuals Plan. The function evaluates whether the Sub Category matches any value in the list: Juices or Soda. If a match is found, the formula returns 52.64 million; otherwise, it returns 0.

Last updated

Was this helpful?