Help

IF and multiple choices

Topic Labels: Formulas
388 1
cancel
Showing results for 
Search instead for 
Did you mean: 
alternaz
6 - Interface Innovator
6 - Interface Innovator

Hello community!

I have a column with 3 simple choices "number of trucks" and I wants to convert these choices into figures in a "quantity" column. 

IF({number of trucks} = "3 trucks of more", "0", )
IF({number of trucks} = "1 truck (24 tons)", "24",)
IF({number of trucks} = "2 trucks (48 tons)", "48",)

I can't close my formula, do you have an idea?

1 Reply 1

Try:

IF({number of trucks} = "3 trucks of more", "0") & 
IF({number of trucks} = "1 truck (24 tons)", "24") &
IF({number of trucks} = "2 trucks (48 tons)", "48")

You could also use a SWITCH() instead:

SWITCH(
  {number of trucks},
  "3 trucks of more", "0",
  "1 truck (24 tons)", "24",
  "2 trucks (48 tons)", "48"
)