I am trying to create a nested if formula. I am trying to build the following formula:
I have come up with the following formula and it is not working:
Hi @Natalie_Lodwig - nested IF statements are always tricky - so easy to miss a comma or bracket. Here’s my method for getting them to work.
Firstly, don’t edit them in the Airtable formula field, but use a text editor, preferably one designed for coding (I use Atom). Copy into the field formula box when done.
Then start with a simple IF:
(copy this into the AT field to check that it works if you want).
Now, copy this formula, enter a comma and new line after “Large” and paste what you have copied on the new line:
modifying the argument and the resulting value:
Repeat this process as many times as needed.
Looking at your screenshot there’s two problems - 1) Number of brackets as per @Jeremy_Oglesby and 2) you have a comma after “Nano influencer”. This comma should be removed. If it is present the formula is expecting an explicit “final” value. As an example, this works:
IF( Number >= 1000, 'Large', IF( Number >= 100, 'Medium', IF( Number >= 10, 'Small' ) ) )
But this doesn’t:
IF( Number >= 1000, 'Large', IF( Number >= 100, 'Medium', IF( Number >= 10, 'Small', ) ) )