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.

IF function to return value based on dates

I am trying to get a value when I put in a particular date

If a person puts a date in the Target completion field, I want to return a Sprint in the Sprint field. I dont know if I can use the month or does it have to be between? For example

=IF([Target Completion Date]@row) is between 8/1/2024 and 8/31/2024 then return "Sprint 1"

OR

=IF([Target Completion Date]@row) is in month 8 then return "Sprint 1"

I want to keep going with month 9, month 10…etc. And if it is blank, return "BLANK

Answers

  • ✭✭✭✭✭

    Hey @Gina Prego,

    You should be able to use a formula like this:

    =IFERROR(IF(Month([Target Completion Date]@row) = 1, "January Sprint", IF(Month([Target Completion Date]@row) = 2, "February Sprint, IF(Month([Target Completion Date]@row) = 3, "March Sprint, etc…))), "")

    You should be able to chain this through all the months! You can use IFERROR to return a blank cell if the date is empty, or you can include an IF statement in the chain that reads:

    IF(ISBLANK([Target Completion Date]@row), "")

    Hope that makes sense!

    If my response was helpful in any way (or answered your question) please be sure to upvote it, mark it as awesome, or mark it as the accepted answer!

    I'm always looking to connect with other industry professionals, feel free to connect with me on LinkedIn as well!

  • ✭✭✭

    That didn't seem to help. So if my date is 6/15/2024 in the column Target Completion Date, I want to return "Sprint 1" on my column labeled Sprint. If my date is 6/29/2024 in the column Target Completion Date, I also want to return "Sprint 1" on my column labeled Sprint because it is in the month of June. If it is July 7 or July 15 or July 25, I want it to be Sprint 2. Target completion date is an actual date, not just a month. I hope this is a less confusing description

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