The essentials of Airtable formulas
  • 18 Jul 2024
  • 3 Minutos para leer
  • Oscuro
    Ligero
  • PDF

The essentials of Airtable formulas

  • Oscuro
    Ligero
  • PDF

The content is currently unavailable in Spanish. You are viewing the default English version.
Resumen del artículo

Plan availability

All plan types 

Platform(s)

Web/Browser, Mac app, and Windows app 

Related reading

In Airtable there are many different fields that you can add to a table; one of them is the formula field type. Formulas let you reference other fields in a table and create different functions based on the content of those fields. This article will cover how to write and format the formula field type.

Creating formula fields in Airtable

Creating formula fields

  1. Visit your Airtable homepage

  2. Create or open your preferred base. 

  3. Add or edit a field

  4. Search for and select Formula

  5. Enter your formula in the provided space below "Formula." 

    1. After adding a formula, you can optionally click Format to customize your formula's results.

NOTE

Keep in mind that all formulas yield a number, date, or text results—with individualized ways to be applied.

Formula terminology 

Formulas in Airtable utilize terms (e.g. "String") and symbols (e.g. "&") common to programming languages, however they are simplified to make formulas easier to write and understand. The table below lists the terms you'll encounter and some common examples of each one.

Word

Usage

Example

Curly bracket

Reference a {Field Name}

{Order Status}

Operator

Symbols used in a formula to output various changes in the formula

&

Function

References a defined formula function that performs specific calculations using specific values in a particular order.

AVERAGE({Order 1},{Order 2})

String

A group of text characters that are used as data in a spreadsheet program. Strings input into formulas must be surrounded by either single or double quotes.

"This order contains the following items..."

Array

A collection of values, typically separated by a comma.

Order 1, Order 2, Order 3

Integer

A whole number value that can be positive, negative, or zero

3

Date format

A readable date that is formatted in a number of different ways.

January 1, 2020

Formatting formula field outputs

Number formats

When the output of a formula is a number, you can format it by double clicking the field name, selecting customize field type, and then selecting formatting. Then, you can apply the following options to the output of your formula:

  • Decimal

  • Integer

  • Currency

  • Percent

  • Duration

Date formats

When the output of a formula is a date, you can apply the following options to the output of your formula:

  • Date format (local, friendly, US, European, ISO)

  • Include a time field

  • Use the same time zone (GMT) for all collaborators

Using single select outputs

When the output of a formula is text, it potentially contains a mix of dates, numbers, and/or plain text. You can format this output to match an option from a preset list similar to single select fields.

To enable single select style formatting:

  1. Visit your Airtable homepage and navigate to the base of your choice.

  2. Locate your preferred formula field and click the ˅ icon next to its name and click Edit field.

  3. Next, click the Formatting tab.

  4. Toggle on "Change formula output to single select options"

  5. Define your preferred options, and select which options to match when the formula output does not match what you've predefined. If you do not set a fallback option, the cell value will be blank for any cells that do not match any of the predefined options.

  6. Click Create field if you are creating a new field or Save if you are updating an existing field.

Using checkbox formatting in formulas with Boolean outputs

When the output of a formula is recognized by our system as a Boolean result, you can apply the Checkbox output type to have the formula format the result similarly to a checkbox field. It’s worth noting that not all formulas will allow for this kind of formatting. We recommend the following functions or operators when building out a formula that you want to format the output as a checkbox, however, other formulas might also yield Boolean outputs recognized by Airtable’s backend system:

  • TRUE()

  • FALSE()

  • AND()

  • OR()

  • XOR()

  • NOT()

  • REGEX_MATCH()

  • =, !=, >, <, >=, <=

To enable checkbox style formatting:

  1. Visit your Airtable homepage and navigate to the base of your choice.

  2. Locate your preferred formula field and click the ˅ icon next to its name and click Edit field.

  3. Next, click the Formatting tab.

  4. Choose the Checkbox output type option.

  5. Optionally, choose the style of the check icon. (Paid plans only)

  6. Click Create field if you are creating a new field or Save if you are updating an existing field.


¿Te ha sido útil este artículo?