Pull month name from date - alternatives to long nested if formula

Answers

  • zemlaka22
    zemlaka22
    edited 12/18/24

    Are there alternatives to using long nested IF statements in Smartsheet formulas to determine the month from a date?

  • Carson Penticuff
    Carson Penticuff ✭✭✭✭✭✭

    @zemlaka22

    That kind of depends on what you are trying to do. If you are just trying to get the month out of a cell:

    MONTH([Your Cell]@row)

    Adding a specific number of days is pretty easy also:

    [Your Cell]@row + 30

    The complexity comes into adding a specific number of months or years to a date. There is not an automatic way to take the number of days in each month, leap years, rollover to the next year, etc., into account.

  • Kelly Moore
    Kelly Moore ✭✭✭✭✭✭

    Hey @zemlaka22

    Building on @Carson Penticuff 's 'depends' statement - if you are asking about converting the month number to the month name one could build a Month reference table (a lookup table) in another sheet and always use it when needing Month names in the future.

    For building the lookup sheet, I would have three columns - The Month number, the full month name and the 3 letter name. If you were getting more specific, you could even add a Quarter column. An Index/Match would easily pull the Name or other fields into a destination sheet without the 12-deep nested IF formula. Currently, lookups or nested IFs are the only way to convert the month number to month name.

    Kelly

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!