- Getting started with Airtable
- Introduction to Airtable basics
- Contacting Airtable Support Updated
- Airtable home screen
- Glossary of Airtable terminology
- Airtable technical requirements
- Feature differences between Airtable on desktop and mobile
- Airtable keyboard shortcuts
- Using Markdown in Airtable
- Adding descriptions in Airtable
- Finding Airtable IDs
- Airtable Automations
- Automations Overview
- Automation feature walkthroughs
- Integrated automation walkthroughs
- Airtable automation walkthroughs
- Linking existing records using automations
- Conditional groups of automation actions
- Repeating groups of Airtable automation actions
- Creating recurring records using automations
- How to delay Airtable automation runs
- Prevent automations from triggering by mistake
- Use automations to timestamp status updates
- Automation Triggers
- Airtable Triggers
- Airtable automation trigger: When record matches conditions
- Airtable automation trigger: When a form is submitted
- Airtable automation trigger: When record created
- Airtable automation trigger: When record updated
- Airtable automation trigger: When record enters view
- Airtable automation trigger: At scheduled time
- Airtable automation trigger: When webhook received
- Airtable automation trigger: When a button is clicked
- Airtable automation trigger: When email received Updated
- Integrated Triggers
- Airtable Triggers
- Automation Actions
- Airtable Actions
- Airtable automation action: Send email Updated
- Airtable automation action: Create record
- Airtable automation action: Update record
- Airtable automation action: Find records
- Airtable automation action: Sort list
- Airtable automation action: Run a script Updated
- Airtable automation action: Generate with AI
- Integrated Actions
- Airtable automation actions: Slack
- Airtable automation actions: Google Workspace
- Airtable automation action: Send MS Teams message
- Airtable automation actions: Outlook
- Airtable automation actions: Jira Cloud
- Airtable automation actions: Jira Server / Data Center
- Airtable automation actions: Salesforce
- Airtable automation action: Create post in Facebook Pages
- Airtable automation actions: GitHub Issues
- Airtable automation action: Hootsuite post
- Airtable automation action: Send Twilio SMS
- Airtable Actions
- Airtable Bases
- Using Airtable Cobuilder
- Airtable bases overview
- Creating and managing Airtable bases
- Structuring bases in Airtable
- Moving bases between workspaces in Airtable
- Creating and managing tables in Airtable
- Creating Airtable base share links
- Importing third-party data into Airtable
- Using insights in Airtable
- Troubleshooting Airtable base performance
- Airtable Betas
- Collaborating in Airtable
- Airtable Enterprise Support
- General Enterprise information
- External badging in Airtable
- Using app library and components in Airtable Updated
- Ask an Expert beta overview
- European data residency at Airtable
- Airtable user groups overview
- Airtable Enterprise API
- Creating and managing data retention policies in Airtable
- eDiscovery APIs in Airtable
- Airtable and data loss prevention
- Accessing Enterprise audit logs in Airtable
- Set up Jira Server / Data Center to connect with Airtable
- Admin panel pages
- Airtable admin panel overview
- Users - Airtable enterprise admin panel
- Airtable admin panel user details
- Groups - Airtable admin panel
- Workspaces - Airtable Enterprise Admin Panel
- Bases - Airtable admin panel
- Interfaces - Airtable admin panel
- Data sets - Airtable admin panel
- Managed apps - Airtable admin panel
- Components - Airtable admin panel
- Reports - Airtable admin panel
- Settings - Airtable admin panel Updated
- Managing Enterprise organizations
- Managing Enterprise admins in admin panel
- Using Organizations
- Organization branding for apps in Airtable
- Enterprise Hub in Airtable
- Enterprise Hub: Org unit assignment with user groups Updated
- Deactivating, removing access, and reactivating users in the admin panel
- Managing user access to workspaces and bases
- Airtable Enterprise Key Management Updated
- Custom terms of use New
- Enterprise SSO
- General Enterprise information
- Airtable Extensions
- Airtable Fields
- Fields Overview
- Attachment
- Date-based fields
- Formula
- Getting Started with Formulas
- Formula Foundations
- The essentials of Airtable formulas
- Formula writing tips for beginners
- Troubleshooting formulas
- Basic calculations
- Conditional statements
- Logical arguments
- Working with dates
- Displaying DATETIME_FORMAT using the date field in Airtable
- Working with date functions in Airtable
- Calculating the difference between dates in Airtable
- Supported DATETIME_DIFF unit specifiers in Airtable
- Supported DATETIME_FORMAT format specifiers in Airtable
- Using the DATETIME_PARSE() formula in Airtable
- Working with timezones
- Record functions
- Text functions
- Numeric functions
- Common Solutions: Beginner
- Common Solutions: Intermediate
- Common Solutions: Advanced
- Long Text Field
- Linked Record Field
- Linking records in Airtable
- Limiting linked record selection to a view in Airtable
- Dynamic filtering in linked record fields
- Linking to one, many, or a subset of Airtable records
- Converting existing fields to Airtable linked records
- Reordering record links in Airtable
- Understanding linked record relationships in Airtable
- Number-Based Fields
- Other Fields
- Rollup, lookup, and count fields
- Select and user fields
- Integrating with Airtable
- API
- Getting started with Airtable's Web API
- Creating personal access tokens
- Airtable Webhooks API Overview
- Service accounts overview
- Airtable Web API - Using filterByFormula or sort parameters
- Airtable API Deprecation Guidelines
- Airtable API: Common troubleshooting
- Managing API call limits in Airtable
- URL length limitations for web API requests
- Integration services
- Third-party integrations via OAuth overview
- Troubleshooting disconnected OAuth integrations in Airtable
- Options for integrating with Airtable
- Third-party integrations - Common troubleshooting
- Low-code integrations - Common troubleshooting
- Integrating Airtable with external calendar applications
- Visualizing records from Airtable in Tableau
- Visualizing Airtable records in Microsoft Power BI & Power Query
- Integrating HubSpot with Airtable
- Using Zapier to integrate Airtable with other services
- Using Zapier's Multi-Step Zaps to find and update records
- Using IFTTT to integrate Airtable with other services
- Integrating with AWS Lambda & DynamoDB
- Developer tools
- API
- Airtable Interface Designer
- Interface Designer overview articles
- Interface layouts
- Interface elements
- Adding and removing elements in interfaces
- Adding layouts to interfaces
- Formatting elements in interfaces
- Interface element: Button
- Interface element: Calendar
- Interface element: Chart
- Interface element: Filter
- Interface element: Gallery
- Interface element: Grid
- Interface element: Kanban
- Interface element: Number
- Interface element: Record picker
- Interface element: Text
- Interface element: Timeline
- Learning and Resources
- Managing Airtable
- Airtable Policy
- Airtable Records
- Airtable Sync
- Airtable Views
- Airtable Workspaces
- Print
- Share
- DarkLight
- PDF
Writing nested IF statements in Airtable
- Updated on 28 Mar 2024
- 3 Minutes to read
- Print
- Share
- DarkLight
- PDF
All plan types | |
Platform(s) | Web/Browser, Mac app, and Windows app |
Related reading |
Structuring IF statements in Airtable
This article covers how to use IF statements to streamline your team's and organization's work.
Structuring IF statements
On its own, an IF function can only have two results—either the logical argument is true, or the logical argument is false. Putting an IF function inside of another IF function - called nesting - can make it so that your formula can output more than two responses.
IF(
Logical Argument 1,
Value 1,
IF(Logical Argument 2,
Value 2,
Value 3
)
)
This function means: If Logical Argument 1 is true, then return Value 1. Otherwise, if Logical Argument 2 is true, then return Value 2. Otherwise, return Value 3.
This can be represented in a chart:
Nesting IF statements in Airtable
Nesting two IF statements
For the example below, any student who received a test score greater than 80 will get "Exceeds expectations ✅", any student who received a test score less than 80 will get "Does not meet expectations ❌", and any student who received a test score of exactly 80 will get "Meets expectations..."
Here is the problem written out in plain language:
If the number in the {Test Score} field is greater than 80, return the text string "Exceeds expectations ✅". Otherwise, if the number in the {Test Score} field is not greater than 80, and it is less than 80, return "Does not meet expectations ❌". Otherwise, if the number in the {Test Score} field is not greater than 80, and it is also not less than 80, return "Meets expectations...".
And here is the problem written out as a formula:
IF(
{Test Score} > 80,
"✅ Exceeds expectations",
IF({Test Score} < 80,
"❌ Does not meet expectations",
"💪 Meets expectations"
)
)
Airtable can support many, many nested IF functions, though it can become difficult difficult to track mistakes in a formula as IF functions pile on top of each other. See our formula writing tips for beginners article for more help on structuring your formulas for easy readability and troubleshooting.
Nesting three or more IF statements
In this example, a group of students have taken a test with a score out of 100 points.
If {Test Score} is less than 70 and greater than or equal to 0, return "❌ Does not meet expectations"
If {Test Score} is greater than or equal to 70, and less than 90, return "💪 Meets expectations"
If {Test Score} is greater than or equal to 90, and less than or equal to 100, return "✅ Exceeds expectations"
If the value in the{Test Score} field is somehow less than 0, or greater than 100, return "Error!"
We need to write a series of IF functions that can return all four possible outcomes, but the catch is that we can only write logical arguments with one operator—e.g., we cannot have "0<{Test Score}<70" as the logical argument in an IF. Therefore, we need to break down this problem into a series of logical arguments that have only one operator.
One way of doing this is represented by the diagram below:
The formula reflecting this series of logical arguments, therefore, looks like this:
IF(
{Test Score} < 0,
"Error!",
IF(
{Test Score} < 70,
"❌ Does not meet expectations",
IF({Test Score} < 90,
"💪 Meets expectations",
IF({Test Score} <= 100,
"✅ Exceeds expectations",
"Error!"
)
)
)
)
NOTE
There aren't any hard limits on how long a formula can be, or how many IF statements can be included. However, situations where you need dozens (or more) of statements may be more simple to approach by writing a custom script instead.