For your final “”, swap it out for BLANK()
instead.
So your formula would look like this:
IF(rate = “low”, {low rate}, IF(rate = “mid”, {mid rate}, IF(rate=“high”, {high rate},BLANK())))
The final “” that you originally had in your formula yielded a “string” result (i.e. a “text” result). If Airtable’s formula engine sees that your formula can have any other results BESIDES a number, then it won’t let you format your formula as a number.
It would actually be really cool if Airtable’s formula engine was smart enough to see multiple different results within your formula — and then let you set a bunch of different types of formatting for the formula field (based on the different types of results that your formula might yield).
But since it doesn’t do that, you would need to make sure that all of your results end up a number.
Luckily, the BLANK() function doesn’t actually result in a string/text (according to Airtable’s formula engine), so then you can apply number formatting – if all of your other formula results end in a number.
Or just leave out the blank (and make sure you use straight quotes instead of curly quotes).
IF(rate = "low", {low rate}, IF(rate = "mid", {mid rate}, IF(rate="high", {high rate})))
Or use a switch statement:
SWITCH(rate,
"low", {low rate},
"mid", {mid rate},
"high", {high rate}
)
Thank you both! I appreciate such a quick solution