---
title: "Comparing Text Strings Using IF Statements | Airtable Support"
slug: "comparing-text-strings-using-if-statements"
description: "This article covers how to compare text strings using the IF function in Airtable to streamline your team's and organization's work."
updated: 2025-06-03T17:00:31Z
published: 2025-06-03T17:00:31Z
stale: true
---

> ## Documentation Index
> Fetch the complete documentation index at: https://support.airtable.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Comparing text strings using IF statements in Airtable

| [**Plan availability**](https://airtable.com/pricing) | All plan types |
| --- | --- |
| **Platform(s)** | Web/Browser, Mac app, and Windows app |
| **Related reading** | - [Getting started with formulas](/docs/getting-started-with-formulas) - [Comparing dates using conditional statements](/docs/comparing-dates-using-conditional-statements) - [Alternatives to using IF() statements](/docs/an-alternative-to-if-statements-using-switch) |

This article covers how to compare text strings using the IF() function in Airtable to streamline your team's and organization's work.

## IF statements in Airtable overview

[IF functions](https://support.airtable.com/docs/formula-field-reference#logical-functions) or conditional statements return one of two values depending on whether a logical argument is true or not. IF statements in Airtable are written in the following format:

```plaintext
IF({logical argument}, {value1},  {value2})
```

> NOTE
> 
> This function means "If [logical argument is true], then return [value1]. Otherwise, return [value2]." The logical argument can either be text or a numeric value, e.g. {Pet's Name}='Rufus' or {Test Score}>75. The return value options can be text, numeric values, or use field names.

## Using IF statements in Airtable

> NOTE
> 
> IF statements work well for many cases, but we recommend trying the [SWITCH function](/docs/an-alternative-to-if-statements-using-switch).

As an example, let's say that you want to track a few projects that are in progress, and output a different message based on the status of the project. Each project can have a status of **Not started, In Progress, or Complete.**

Here's what you may want to output in another field based on the status:

- Not started: ❌
- In Progress: ❌
- Complete: ✅

The formula below will output a different emoji character based on the text value in the **Status** field.

```plaintext
IF({Status}='Complete','✅','❌')
```

![360055124994ScreenShot2020-01-14at10810PM.jpg](https://cdn.airtable.document360.io/d0ee2ee4-3f78-47c7-b388-85e40be9fb89/Images/Documentation/360055124994ScreenShot2020-01-14at10810PM.jpg)

For another example, a small business may want to generate different messages to push to their website regarding inventory status. Items that are in stock should display one message, while items out of stock should alert the customer so they can be put on a waitlist.

Using the same formula structure, we can conditionally output a different message based on inventory status.

```plaintext
IF(
  {Inventory}='In stock',
    "Item is in stock and available for purchase",
    "ℹ️ This item is on backorder, but will be back in stock soon"
)
```

![360056003573Inventory.jpg](https://cdn.airtable.document360.io/d0ee2ee4-3f78-47c7-b388-85e40be9fb89/Images/Documentation/360056003573Inventory.jpg)
