Blog

Airtable: IF when field contains text (Multiple select) + Yesterday

FE
Filla EditorialbeginnerOct 31, 2025

IF when a field contains specific text

If your field is a Multiple select (e.g., Camp, Membership, Donation), in formulas it behaves like a comma‑separated string. To test whether a given choice is present, use FIND or SEARCH.


Case‑sensitive (FIND)

IF(
  FIND("Member", {Tags}),
  "Member",
  "Nonmember"
)

Notes:

  • Returns the position if found; blank if not. Any non‑zero value is treated as truthy in IF.
  • Exact case matching. Use SEARCH for case‑insensitive.

Case‑insensitive (SEARCH)

IF(
  SEARCH("member", LOWER({Tags})),
  "Member",
  "Nonmember"
)

Tip: Wrapping the field in LOWER() lets you search once in lowercase.


Avoid partial matches

If choices could overlap (e.g., VIP vs VIP Gold), pad with separators to avoid false positives:

IF(
  FIND(", Member,", ", " & {Tags} & ", "),
  "Member",
  "Nonmember"
)

This forces full‑token matching in the comma‑separated list.


Multiple categories

SWITCH(
  TRUE(),
  FIND("Camp", {Tags}), "Camp",
  FIND("Membership", {Tags}), "Member",
  FIND("Donation", {Tags}), "Donor",
  "Other"
)

SWITCH(TRUE(), …) is a clean pattern for priority checks.


“Yesterday” in formulas

Common tasks: flag records from yesterday, or branch logic based on yesterday’s date.

Check if a date is yesterday

IS_SAME(
  {Date},
  DATEADD(TODAY(), -1, 'days'),
  'day'
)

Returns 1 if {Date} is on the day before today (in the base’s timezone).

Conditional label for yesterday

IF(
  IS_SAME({Date}, DATEADD(TODAY(), -1, 'days'), 'day'),
  "Yesterday",
  ""
)

Combine with "contains" logic

Example: “Count as Member (Yesterday only)”

IF(
  AND(
    FIND("Member", {Tags}),
    IS_SAME({Date}, DATEADD(TODAY(), -1, 'days'), 'day')
  ),
  "Member (Yesterday)",
  ""
)

Tips

  • TODAY() recalculates daily; for precise time windows, use NOW() with care and consider time zone settings.
  • For case‑insensitive contains without token pitfalls, REGEX_MATCH can also be used, though FIND/SEARCH is usually sufficient.

Source

Community Q&A on using IF with “contains” for select text: IF formula when field "contains" select text

Airtable: IF when field contains text (Multiple select) + Yesterday