Calculating Next Monday, Wednesday, Friday

I'm trying to write a formula to calculate the next monday, wednesday, and friday following a particular date.

The AI formula generated =IF(ISDATE([Start Date]@row), [Start Date]@row + (8 - WEEKDAY([Start Date]@row, 2)), "") using the example above; however, it generated an #INCORRECT ARGUMENT error.

The expected results should be MON, 12/30/2024, WED, 1/1/2025, and FRI, 1/3/2025.

Can someone help me figure out why?

Tags:

Answers

  • dojones
    dojones ✭✭✭✭✭

    First, make sure Week 1 - Mon is a Date column type. Then try this:

    Week 1 - Mon:

    =IF(ISDATE([Start Date]@row), [Start Date]@row + (9 - WEEKDAY([Start Date]@row)), "")

    Week 1 - Wed:

    =IF(ISDATE([Start Date]@row), [Start Date]@row + (9 - WEEKDAY([Start Date]@row)), "")

    Week 1 - Fri:

    =IF(ISDATE([Start Date]@row), [Start Date]@row + (13 - WEEKDAY([Start Date]@row)), "")

  • Awesome, that worked. But now, let me throw in a curve ball. What if, rather than calculating the next Monday, Wednesday, and Friday, it calculated the next session date, regardless. Example, if today is 12/27, the next three return values are 12/30, 1/1, and 1/3; however, if the start date is 12/30, then the return values are 1/1, 1/3, and 1/6. Also, is it possible to account for the holidays or in other words, return only WORKDAYS equal to a Monday, Wednesday, or Friday?

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!