Skip to main content

Using formula columns

Populate sheet cells with a custom formula

Overview

Formula columns allow you to populate sheet cells with a custom formula that references other columns as variables.

Add a formula column

To add a formula column:

  1. Add a column and choose the type "Formula".

  2. Use functions and operators to enter a formula that references at least one existing column from this sheet as a variable. Add a function quickly by clicking an option from the list below the formula text box. Reference a column by clicking Variable underneath the formula text box.

  3. Select a number format for the formula output.

  4. Click Add Column.

Available formula operators, functions, and variables

There are many formula operators and functions available for you to use. You can reference text columns, list columns, shared columns, formula columns, and shared formula columns as variables. You can also have numbers, text, and emojis as outputs.

  • Variables: Represent data from a field. Always enclose variable names in curly braces, like {Variable Name}.

  • Functions: Predefined formulas that perform specific calculations or operations. They take arguments within parentheses to produce a result.

  • Arguments: The values, variables, or expressions a function needs to perform its action. Arguments are enclosed in parentheses and separated by commas.

Category

Operator / Function

Syntax

Description

Example

Variables

Variable

{ }

References the value of a cell in another column.

{Policy Score}

Basic Math

Addition

+

Adds two or more numbers.

{Value A} + {Value B}

Subtraction

-

Subtracts one number from another.

{Value A} - 25

Multiplication

*

Multiplies two or more numbers.

{Value A} * 1.05

Division

/

Divides one number by another.

{Total Revenue} / {Unit Sales}

Comparison

Equals

=

Checks if two values are equal. Returns true or false.

{Status} = "Active"

Does not equal

<>

Checks if two values are not equal. Returns true or false.

{Status} = "Closed"

Greater than

>

Checks if the first value is greater than the second. Returns true or false.

{Age} > 18

Less than

<

Checks if the first value is less than the second. Returns true or false.

{Days Overdue} < 30

Greater than or equal to

>=

Checks if the first value is greater than or equal to the second.

{Grade} >= 90

Less than or equal to

<=

Checks if the first value is less than or equal to the second.

{Inventory} <= 100

Logical

IF

IF(condition, true_value, false_value)

Returns one value if a condition is true, and another if it's false.

IF({Score} > 70, "Pass", "Fail")

IFS

IFS(condition_1, true_value_1, [condition_2, true_value_2, ...])

Evaluates multiple conditions and returns the value for the first one that is true.

IFS({Score} >= 90, "A", {Score} >= 80, "B", true, "C")

AND

AND(condition_1, condition_2, ...)

Checks if all conditions are true. Returns true only if every condition is met.

AND({Score} > 70, {Attendance} > 90)

OR

OR(condition_1, condition_2, ...)

Checks if any of the conditions are true. Returns true if at least one condition is met.

OR({Status} = "Completed", {Status} = "Cancelled")

NOT

NOT(condition)

Reverses a logical value. If the condition is true, it returns false, and vice versa.

NOT({Is Approved})

Math Functions

AVERAGE

AVERAGE(value_1, value_2, ...)

Calculates the average (arithmetic mean) of a set of numbers.

AVERAGE({Q1 Sales}, {Q2 Sales})

SUM

SUM(value_1, value_2, ...)

Calculates the sum of a set of numbers.

SUM({Item 1 Price}, {Item 2 Price})

MIN

MIN(value_1, value_2, ...)

Finds the smallest number in a set of values.

MIN({Score 1}, {Score 2}, {Score 3})

MAX

MAX(value_1, value_2, ...)

Finds the largest number in a set of values.

MAX({Score 1}, {Score 2}, {Score 3})

LARGER

LARGER(value_1, value_2)

Returns the larger of two given numbers.

LARGER({Expected Value}, {Actual Value})

ROUND

ROUND(number, num_digits)

Rounds a number to a specified number of decimal places.

ROUND({Total}, 2)

SQRT

SQRT(number)

Returns the positive square root of a number.

SQRT(25)

POWER

POWER(number, power)

Raises a number to a specified power.

POWER(2, 3) (returns 8)

Text Functions

UPPER

UPPER(text)

Converts all letters in a text string to uppercase.

UPPER({Product Code})

LEFT

LEFT(text, num_chars)

Extracts a specified number of characters from the beginning of a text string.

LEFT({Product ID}, 3)

RIGHT

RIGHT(text, num_chars)

Extracts a specified number of characters from the end of a text string.

RIGHT({Serial Number}, 4)

CONCAT

CONCAT(text_1, text_2, ...)

Joins two or more text strings together.

CONCAT({First Name}, " ", {Last Name})

SPELLNUMBER

SPELLNUMBER(number)

Converts a number into its spelled-out, English text equivalent.

SPELLNUMBER(123) (returns "one hundred twenty-three")

Date Functions

YEAR

YEAR(date)

Extracts the year from a date.

YEAR({Service Date})

MONTH

MONTH(date, [format])

Extracts the month from a date. The optional format parameter lets you format the output using date-fns format syntax.

MONTH({Service Date}, "MMMM")

DAY

DAY(date)

Extracts the day of the month from a date.

DAY({Service Date})

WORKDAY

WORKDAY(start_date, days)

Calculates a future or past date based on a starting date and a number of workdays, automatically excluding weekends.

WORKDAY({Project Start}, 10)

DATEADD

DATEADD(date, number)

Adds a specified number of days to a date.

DATEADD({Invoice Date}, 30)

Conditional

IFBLANK

IFBLANK(value)

Checks if a value is blank. Returns true or false.

IFBLANK({Middle Name})

Formula evaluation errors

A formula column will calculate automatically if the column(s) it references contain valid data. A cell in a formula column will display a warning if the formula can't be calculated. Hover over the warning to view the formula error message.

The message Error evaluation formula: Variable {column name} is invalid means that something is wrong with the data in the column specified which is preventing the formula from calculating a result.

For example, a column that this formula uses contains no data. To fix this, look at the column specified in the warning and make sure that cell contains valid data.

Did this answer your question?