Skip to main content
Question

How do I convert the Formula field to a numeric value when using SWITCH function with a Select list

  • May 7, 2025
  • 2 replies
  • 94 views

Forum|alt.badge.img+1

Hello,

I am working with a formula field that I have created to take a Select list value from Field 1 and change it into a number. Example:

Switch ( {field 1}

“Choice 1”, ‘1’,

“Choice 2”,  ‘2’

)

The output of this is a text value of 1 or 2 not a numeric value. The tool will not allow me to use the following , the 1 and 2 turn red.

Switch ( {field 1}

“Choice 1”, 1,

“Choice 2”,  2

)

Using the first switch function how do I now set the 1 and 2 to a numeric value?

2 replies

Mike_AutomaticN
Forum|alt.badge.img+28

Hey ​@KaCoates!

Please use the formula below. I tested it, and it should achieve what you are looking for.
 

VALUE(
SWITCH(
{Single},
"Choice 1", "1",
"Choice 2", "2"
)
)


Value() formula converts text to number!

Hope this helps. 

Mike, Consultant @ Automatic Nation


ScottWorld
Forum|alt.badge.img+35
  • Genius
  • May 7, 2025

The simpler version of this formula doesn’t need VALUE… you can do it like this:

SWITCH(
{Field},
"Choice 1", 1,
"Choice 2", 2
)

- ScottWorld, Expert Airtable Consultant