Logical Formulas

Formulas

  1. And

  2. Equals

  3. If

  4. NotEquals

  5. Or

  6. Xor

  7. Not

  8. Contains

  9. Iferror

And

Formula

=and(input 1, [input 2, ...])

Description

Returns TRUE if every input is true or truthy, otherwise returns FALSE.

Arguments

Argument

Required (Y/N)

Description

Input 1

Y

The first value or condition that you want to evaluate for TRUE or FALSE

Input 2

N

The second value or condition that you want to evaluate for TRUE or FALSE

... Input N

N

The nth value or condition that you want to evaluate for TRUE or FALSE

Examples

Example 1:

=and(equals(5,5), equals(4,4)) = TRUE

Example 2:

=and(not($"IsEmployee"), $"NorthAmericaOffice")

Equals

Formula

=equals(input 1, [input 2, ...])

Description

Returns TRUE if every input is equal to each other, otherwise returns FALSE

Arguments

Argument

Required (Y/N)

Description

Input 1

Y

Value evaluated along with other input values (Input 2...Input N)

Examples

Example 1:

=equals(5, 5, 5) will return TRUE

Example 2:

=equals(1,1,2) will return FALSE

Example 3:

=equals($"FirstName", "Peter")

If

Formula

=if(condition, value_if_true, [value_if_false])

Description

Returns value_if_true if the Condition is TRUE. Otherwise returns value_if_false.

Arguments

Argument

Required (Y/N)

Description

Condition

Y

Statement, value or logical operation evaluated for TRUE or FALSE

value_if_true

Y

Value returned if Condition is TRUE

value_if_false

N

Value returned if Condition is FALSE

Examples

Example 1:

=if($"PurchaseDate", $"PurchaseDate", currentdate())

Example 2:

=if(equals($"First Name", "Bridget"), $"First Name", skip())

NotEquals

Formula

=notequals(input 1, [input 2, ...])

Description

Returns FALSE if every input is equal to each other, otherwise returns TRUE

Arguments

Argument

Required (Y/N)

Description

Input 1

Y

Value evaluated along with other input values (Input 2...Input N)

Examples

Example 1:

=notequals(5, 5) will return FALSE

Example 2:

=notequals(5,5,3) will return TRUE

Example 3:

=equals($"FirstName", "Peter")

Or

Formula

=or(input 1, [input 2, ...])

Description

Returns TRUE if at least one input is true or truthy, otherwise returns FALSE

Arguments

Argument

Required (Y/N)

Description

Input 1

Y

The first value or condition that you want to evaluate for TRUE or FALSE

Input 2

N

The second value or condition that you want to evaluate for TRUE or FALSE

... Input N

N

The nth value or condition that you want to evaluate for TRUE or FALSE

Examples

Example 1:

=or(equals(2,5), equals(4,4)) = TRUE

Example 2:

=or(not($"Is Employee"), $"Lives in North America")

Xor

Formula

=xor(input 1, [input 2, ...])

Description

Returns TRUE if at exactly one input is true or truthy, otherwise returns FALSE

Arguments

Argument

Required (Y/N)

Description

Input 1

Y

The first value or condition that you want to evaluate for TRUE or FALSE

Input 2

N

The second value or condition that you want to evaluate for TRUE or FALSE

... Input N

N

The nth value or condition that you want to evaluate for TRUE or FALSE

Examples

Example 1:

=xor(equals(2,5), equals(4,4)) = TRUE

Example 2:

=xor(equals(2, 5), equals(4,5)) = FALSE

Example 3:

=xor(not($"Is Employee"), $"Lives in North America")

Not

Formula

=not(input)

Description

Returns TRUE if the given input is falsy, otherwise returns FALSE.

Arguments

Argument

Required (Y/N)

Description

Input

Y

Statement or operation that is evaluated for TRUE condition

Examples

Example 1:

=not(true) = FALSE

Example 2:

=not($"Is Employee")

Contains

Formula

=contains(input, content)

Description

Returns TRUE if the given content is contained within the input argument, otherwise returns FALSE.

Arguments

Argument

Required (Y/N)

Description

Input

Y

Statement or operation that is searched for the presence of Content value

Content

Y

Value to be searched within Input argument

Examples

Example 1:

=contains("last name", "name") will return TRUE

Example 2:

=contains($"date", "2020-02-2017")

Example 3:

=contains($"full name", $"last name")

Iferror

Formula

=iferror(condition, value_if_error, [value_if_noerror])

Description

Returns value_if_error if the Condition has an ERROR. Otherwise returns value_if_noerror.

Arguments

Argument

Required (Y/N)

Description

Condition

Y

Statement, value or logical operation evaluated for ERROR

Value_if_error

Y

Value returned if Condition has an ERROR

value_if_noerror

N

Value returned if Condition does not have an ERROR

Examples

Example 1:

=iferror($"request_date", "Date Missing",$"request_date")

Example 2:

=iferror(divide(10,0), "Divide by zero") will return Divide by zero