Month Formula

Hi Everyone!

I would like to capture the month of an entry based on a specific status and date created. Does anyone have an insight of how the formula should be? Thanks!

Answers

  • KPH
    KPH Community Champion

    You can return the month part of a date column using the MONTH function:

    https://help.smartsheet.com/function/month

    You can use this within an IF function:

    https://help.smartsheet.com/function/if

    Your formula might look something like:

    =IF(Status@row = "Completed", MONTH(Created@row), "Not completed")

    Where Status is the name of the Status column and Created is the name of the date column. This will return the Month from the Created column if the Status column is "Completed". If the Status column has anything other than "Completed" in it, the formula will return "Not completed".

    If you also want to include the date created in the logic, you can do so using the AND function:

    https://help.smartsheet.com/function/and

    Your formula might look something like:

    =IF(AND(Status@row = "Completed", YEAR(Created@row) = 2021), MONTH(Created@row), "Not completed")

    This will only return the month if the status is completed AND the created date was in 2021.

    Hope this helps.

  • The MONTH function can be combined with IF and AND functions. This is how it can be structured:

    =IF(AND([Status]@row = "YourStatus", [Date Created]@row <> ""), MONTH([Date Created]@row), "")

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!