The formula seems to work, but when I try to use these columns elsewhere, I get NaN values. I tried wrapping the output values in INT(), but that messed everything up. What am I doing wrong? Is there a better way to do this?
I ran into a similar issue with Airtable formulas recently. The problem is likely that FIND() returns an error when the substring isn’t found, causing the whole formula to return NaN. A more robust approach is to use SEARCH() instead, which returns 0 if the substring isn’t found. Here’s a modified version that should work:
This way, you’ll always get a number output, even if none of the conditions are met. You can adjust the default value (currently 0) at the end if needed. Also, make sure your {Functional response} field actually contains the numbers you’re looking for as strings.
Your approach is on the right track, but there’s a more efficient way to handle this in Airtable. Instead of nested IF statements, consider using the SWITCH function. It’s cleaner and easier to maintain. Here’s an example: