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

  • I'm trying to create a SUMIF formula that looks at the salesperson name in a column and adds up or totals their $ sales in another column. To ultimately show in Dashboard of Totals Sales by Salesperso…
    User: "Allan Z"
    Answered ✓
    9
    2
  • Good day Smartsheet Team, Getting an unparseable error on this formula: =IF($Name@row <> "",(SUMIFS({Expense}, {Period},1, {Type}, OR(@cell = "RES602782", @cell = "RES602497")),"") Trying to pull in a…
    User: "stratman"
    Answered ✓
    15
    2
  • I have a sheet that compiles all the responses from a form. The sheet has multiple start and end date columns, but only one start and one end date cell is NOT blank depending on the activity selected …
    User: "m_anderson"
    Answered ✓
    13
    2