Skip to main content
Solved

How to multiply the value returned by the IF Statement without showing an error


I’m using IF Statement with return numbers for two conditions: If it’s a car, one value, if it’s a motorcycle, another value.

Everything is ok about that, however, when trying to multiply the presented result, it shows #ERROR!, how to solve it?

Best answer by kuovonne

Sure!




Remove the quotes around the numbers in your IF formula.

View original
This topic has been closed for replies.

6 replies

TheTimeSavingCo
Forum|alt.badge.img+32

Hm, sounds like the value you’re trying to multiply is a string. Could you paste your formula here so that I can try to provide a suggestion?


A quick thing to check would be whether you’re wrapping the numbers in quotes.

The following would return a value you could multiply by:

IF(
  {Field} = "Car",
  1,
  2,
)

And this would not:

IF(
  {Field} = "Car",
  "1",
  "2",
)

kuovonne
Forum|alt.badge.img+29

Welcome to the Airtable community!

Can you share a screen capture that shows the column headings and some sample data?


Hm, sounds like the value you’re trying to multiply is a string. Could you paste your formula here so that I can try to provide a suggestion?


A quick thing to check would be whether you’re wrapping the numbers in quotes.

The following would return a value you could multiply by:

IF(
  {Field} = "Car",
  1,
  2,
)

And this would not:

IF(
  {Field} = "Car",
  "1",
  "2",
)

Yes:

IF(
  {Veículo} = "Carro", 
    "1.18",
    IF({Veículo} = "Moto", 
      "0.35"
    )
)

=
#ERROR!


Welcome to the Airtable community!

Can you share a screen capture that shows the column headings and some sample data?


Sure!




kuovonne
Forum|alt.badge.img+29
  • Brainy
  • Answer
  • May 25, 2022

Sure!




Remove the quotes around the numbers in your IF formula.


Remove the quotes around the numbers in your IF formula.


That’s right, it worked. Thank you very much.