Formulas and Functions

Formulas and Functions

Ask for help with your formula and find examples of how others use formulas and functions to solve a similar problem.

Month to Number

I have a month field that I would like to switch to a number for sorting.

I have tried a bunch of different calculations to try and get the Month field to turn into a number but haven't been successful.



Best Answer

  • ✭✭✭✭✭✭
    Answer ✓

    @Angela L

    The basic idea of the formula that Itai provided is the one to use. However, since the month is just a text string, you don't need the month function (which works on dates, not text). Try this format; keep going until all of the months are present:

    =IF(Month@row = "January", 1, IF(Month@row = "February", 2))

    Hope this helps!

Answers

  • ✭✭✭✭✭✭

    Hey,


    Try this formula: =IF(MONTH([month]@row) = "January" , "1", IF(MONTH([month]@row) = "February", 2....))

    Keep writing this formula for all of the months.

    Itai Perez

    If you found my comment helpful any reaction, Insightful, Awsome etc... would be appreciated🙂

    https://www.linkedin.com/in/itai-perez/

  • ✭✭✭

    I have tried this formula and it doesn't work, I get UNPARSEABLE error. The month is being populated via a drop down box, I am not sure if that is making a difference. The information is being populated via a form.

  • ✭✭✭✭✭✭
    Answer ✓

    @Angela L

    The basic idea of the formula that Itai provided is the one to use. However, since the month is just a text string, you don't need the month function (which works on dates, not text). Try this format; keep going until all of the months are present:

    =IF(Month@row = "January", 1, IF(Month@row = "February", 2))

    Hope this helps!

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!

Trending in Formulas and Functions