Using logical operators to compare field values in Airtable
  • 11 Dec 2023
  • 1 Minute to read
  • Dark
    Light
  • PDF

Using logical operators to compare field values in Airtable

  • Dark
    Light
  • PDF

Article Summary

Logical operators allow you to compare values in one field to other fields. See the operators listed below for an introduction to their symbols and usage. 

Plan availability

All plans types

Platform(s)

Web/Browser, Mac app, and Windows app

Related reading

Operators in Airtable

Airtable operators

Operator

Symbol

Use

Example

Greater than

>

 

Compare if one number is greater than another

 

IF(5 > 5 ...

Less than

<

 

Compare if one number is less than another

 

IF(5 < 5 ...

Greater than or equal to

>=

 

Compare if one number is greater than or equal to another

 

IF({Field A} >= {Field B} ...

Less than or equal to

<=

 

Compare if one number is less than or equal to another

 

IF({Field A} <= {Field B} ...

Equal to 

=

 

Compare if one value is equal to another value

 

5 = 5

Does not equal

!=

 

Check if one value is not equal to another value

 

IF({Field A} != {Field B} ...

Greater and less than operators

NOTE

For the following examples, assume that you want to compare income against expenses on a weekly basis.

Greater than

First, check if income is greater than expenses. If income is greater than expenses, the result of the formula will be a 1 (meaning true), and if not, a 0 (meaning false).

360053238454ScreenShot2019-12-09at111157AM.jpg

{Income} > {Expenses}

Less than

Now, check if income is less than expenses. If income is less than expenses, the result of the formula will be a 1, and if not, a 0.

360054110593ScreenShot2019-12-09at111533AM.jpg

{Income} < {Expenses}

Greater, less than, and equal to operators

Greater than or equal to

Similar to the formulas above, we can compare if income is greater than or equal to expenses (still returning a 1 or 0). The difference is most obvious in the below table when the Income and Expenses are equal—the formula returns 1.

1500009035801greaterthan.png

{Income} >= {Expenses}

Less than or equal to

Now we can check the opposite, let's compare if income is less than or equal to expenses by changing the operator.

1500008761042lessthan.png

{Income} <= {Expenses}

Equal and does not equal to operators

Equal

Check if income is exactly equal to expenses.

360053238554ScreenShot2019-12-09at112649AM-1.jpg

{Income} = {Expenses}

Does not equal

Likewise, we can check if a value is not equal to another by adding “!” before the “=” icon.

360053239274ScreenShot2019-12-09at112855AM-1.jpg

{Income} != {Expenses}


Was this article helpful?