Formula HELP

Answers

  • Hi there,

    I'm looking for something similar and am stuck on my formula. We have a class ("LCST") that happens throughout the work week (M-F); and we pull a report every Friday with the range of the prior Friday through current week's Thursday. For example, on today 11/08/24, we would run the report for (last Friday) 11/1 - (yesterday, Thursday) 11/7.

    So far, I have the formula as:

    =IF(OR(Class@row = "DX Traditions", Class@row = "LMTR"), [Start Date]@row + 1, IF(Class@row = "LCST", ([Start Date]@row + 6 - WEEKDAY([Start Date]@row))))

    This formula works okay as long as the start date is not a Friday. See the below highlighted in yellow — a Friday date remains the same. Can anyone help incorporate what to do if the start date IS a Friday? How can I get the Aftercare column to reflect the following Friday?

  • Carson Penticuff
    Carson Penticuff ✭✭✭✭✭✭

    We can throw in a special case just for Fridays:

    =IF(OR(Class@row = "DX Traditions", Class@row = "LMTR"), [Start Date]@row + 1, IF(Class@row = "LCST", IF(WEEKDAY([Start Date]@row) = 6, [Start Date]@row + 7, ([Start Date]@row + 6 - WEEKDAY([Start Date]@row)))))

  • Carson Penticuff
    Carson Penticuff ✭✭✭✭✭✭

    Happy to help! 🙂

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!