Help

Re: Need help with an IF statement

Solved
Jump to Solution
1485 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Marcos_Sacrista
5 - Automation Enthusiast
5 - Automation Enthusiast

Hello,

I’m new writting formulas, I’ve read all the guides on airtable’s website and other posts in the forum.
However I can’t get my formula to work. I only need that when the value of a cell is equal to a number a specific name appears.

This is what I’ve wrote; IF (Total = “6.99”, Hernia discal, BLANK())
But airtable won’t let me keep the formula because it’s misspelled.

Any advises?
Thanks.

1 Solution

Accepted Solutions
Kamille_Parks
16 - Uranus
16 - Uranus

Anything that isn’t a function or the name of a field needs to be in either straight apostrophes or quotation marks. If a field name contains a space it must be surrounded by curly braces.

So your formula should likely be either:

IF(
   Total = "6.99",
   "Hernia discal",
   BLANK()
)

or

IF(
   Total = "6.99",
   {Hernia discal},
   BLANK()
)

See Solution in Thread

4 Replies 4
Kamille_Parks
16 - Uranus
16 - Uranus

Anything that isn’t a function or the name of a field needs to be in either straight apostrophes or quotation marks. If a field name contains a space it must be surrounded by curly braces.

So your formula should likely be either:

IF(
   Total = "6.99",
   "Hernia discal",
   BLANK()
)

or

IF(
   Total = "6.99",
   {Hernia discal},
   BLANK()
)
Marcos_Sacrista
5 - Automation Enthusiast
5 - Automation Enthusiast

Thanks a lot for your fast reply, It worked.
What if I want to add different values for total? I’ve tried to duplicate the formula with different values but it doesn’t work,

Something like this:
Total = “6.99”,
“Hernia discal”,
BLANK()
Total = “10.99”,
“Hernia discal lumbar”,
BLANK()
Total = “15.99”,
“Hernia discal cervical”,
BLANK()

Thanks a lot for your help.

If you’re comparing the value of one thing multiple times you could use a SWITCH statement.

SWITCH(
   Total,
   "6.99",
   "Hernia discal",
   "10.99",
   "Hernia discal lumbar",
   "15.99",
   "Hernia discal cervical",
   BLANK()
)

For your reference, if you wanted to nest an IF() statement it would look like this:

IF(
   Total = "6.99",
   "Hernia discal",
   IF(
      Total = "10.99",
      "Hernia discal lumbar",
      IF(
         Total = "15.99",
         "Hernia discal cervical",
         BLANK()
      )
   )
)
Marcos_Sacrista
5 - Automation Enthusiast
5 - Automation Enthusiast

Thanks mate, you’re a beast.