 # Help with a formula not allowing me to format as number

I have rate fields low, mid, high.
The rate fields are lookups - formatted as decimals.

Then I have a formula field
IF(rate = “low”, {low rate}, IF(rate = “mid”, {mid rate}, IF(rate=“high”, {high rate},"")))
which results in the correct number, but the formula will not allow me to format as a number.

What am I overlooking?
Thanks!

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.

1 Like

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}
)
``````
1 Like

Thank you both! I appreciate such a quick solution

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.