Complex nested IF conditions in Airtable formulas

I’m working with Airtable and trying to build a complex formula but running into issues. Here’s what I need to accomplish:

My setup:

  • Three status values: ST, PR, AD
  • Three columns to check: LevelF, RegionF, TypeF
  • Need to populate a column called Status

The logic I want:

  1. If Level equals ST, then set Status to ST
  2. If Level equals PR, then check if Region is AD or PR, OR if Type is AD or PR. If yes, set Status to PR, otherwise set to ST
  3. If Level equals AD, then check if Region is AD OR if Type is AD. If yes, set Status to AD, otherwise set to ST

Here’s my current formula attempt:

IF(LevelF = "ST", "ST", IF(LevelF = "PR", IF(OR(RegionF = "AD", RegionF = "PR", TypeF = "AD", TypeF = "PR"), "PR", "ST"), IF(LevelF = "AD", IF(OR(RegionF = "AD", TypeF = "AD"), "AD", "ST"), "")))

The formula isn’t working as expected. What am I doing wrong with the nested IF and OR structure?

Been dealing with these exact nested formula headaches for years. Your logic’s solid but I’d bet money on one specific issue - data type mismatches.

Airtable sometimes treats values as different types even when they look identical. Here’s what I do when formulas like yours act up:

First, add UPPER() around your field comparisons:

IF(UPPER(LevelF) = "ST", "ST", IF(UPPER(LevelF) = "PR", IF(OR(UPPER(RegionF) = "AD", UPPER(RegionF) = "PR", UPPER(TypeF) = "AD", UPPER(TypeF) = "PR")), "PR", "ST"), IF(UPPER(LevelF) = "AD", IF(OR(UPPER(RegionF) = "AD", UPPER(TypeF) = "AD")), "AD", "ST"), "ERROR")))

Second - and this saved me countless hours debugging - create a helper column that shows LevelF & "|" & RegionF & "|" & TypeF. This lets you see exactly what values the formula’s working with.

I had a similar setup last year where everything looked right but the formula kept failing. Turned out some records had single select values while others had text values that looked identical but weren’t.

The UPPER() wrapper usually fixes most of these weird comparison issues. Give it a shot and see if your formula starts behaving.

Your formula looks fine logically. I had a similar issue where nested conditions worked but gave weird results because of case sensitivity. Airtable treats “ST” differently from “st” or “St”, so double-check that your data matches your formula conditions exactly. Instead of ending with an empty string, add a catch-all condition - it’ll help you spot records that don’t match any expected patterns. I’d test each part separately by creating temp columns with simpler formulas to see where things break. Sometimes it’s not the nesting that’s wrong, just how the data’s formatted in your source columns.

Your formula structure looks right, but here’s a debugging trick that usually catches the problem. Make a temp text column with this: "Level: " & LevelF & " | Region: " & RegionF & " | Type: " & TypeF & " | Length: " & LEN(LevelF). You’ll see the exact character count and spot any hidden formatting weirdness.

Also check if any of these fields are linked records or lookups - they act weird in formulas compared to single select or text fields. I’ve seen lookup fields return arrays even when they look like single values, which breaks the comparison.

Try hardcoding values first: swap LevelF with “ST” temporarily and see if the logic works. If it does, you know it’s a data formatting issue, not your nested structure.

Your formula looks correct – I’ve had similar experiences with nested conditions. The issue likely stems from your data rather than the logic itself. A common pitfall is trailing spaces in your data values; Airtable is sensitive to exact matches. Ensure your column names are accurate, including any spaces or special characters. I faced a similar problem once, where a status value contained an invisible space. Try testing it on a single record first using simpler IF statements to evaluate each condition. Additionally, consider replacing the empty string at the end with ‘Unknown’ or ‘Error’; this helps identify records that fail to align with your conditions.

your formula syntax looks good. id check for hidden characters in your data - happens all the time when copy-pasting values. try wrapping your field references with trim() like trim(LevelF) = “ST” to strip any whitespace. also double-check your field names since airtable formulas are case-sensitive.