Help

Re: Nested If formulas using Single select field

1436 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Tim_Belding
4 - Data Explorer
4 - Data Explorer

I would like to create a nested IF formula that will output text to the formula cell based on which option is selected in the single select field. This is what I have so far.

IF ({Single Select Field} = “A”, “Answer 1”, If ({Field} = “B”, “Answer 2”)) etc.

It would ended up being about 10 different options.

Thank You

5 Replies 5

And what is the question? That is the way to go :grinning_face_with_sweat: . https://support.airtable.com/hc/en-us/articles/221564887-Nested-IF-formulas

Tim_Belding
4 - Data Explorer
4 - Data Explorer

I thought the question was implied. The formula I have so far is not working and I don’t know why. I got as far as I did using the support page you suggested.

Any further help would be appreciated.

I don’t see nothing wrong, maybe the second IF should be CAPITAL? :thinking:

Danny
6 - Interface Innovator
6 - Interface Innovator

The most likely culprit is the parentheses. Make sure you have the right number of closing parentheses.

There can’t be a space between ‘IF’ and ‘(’.

(I’m assuming the curly quotes in your example are an artifact of your posting them in this forum. If they are part of your formula — for instance, if you copy-and-pasted that section of the formula from a post on this forum — replace them with straight quotes as entered from your keyboard.)

quotes

Also, it’s often easier when dealing with long or complicated IF() statements to compose them in another editor — I use Notepad++ because of its automatic parenthesis-matching capabilities; there are similar apps available for macOS and Linux — and then paste them into Airtable. Note that you can paste indented code into an Airtable formula and have it work; even better, the indentation is retained should you later wish to copy-and-paste it from Airtable into your editor.

IF(
    {Single Select Field} = 'A',
    'Answer 1',
    IF(
        {Single Select Field} = 'B',
        'Answer 2'
        )
    )