Nested IF Formula

Hi All, I'm trying to create a shift overview for an upcoming project, and would like to be able to enter a Start Time and End Time into 2x cells, and for the formula to fill in "1" into the corresponding cells to create a calendar view. Example below (just 1s filled in until I know what the formula is!!). I've tried multiple IF / IF(AND) functions to no luck. Anyone want to have a go at figuring out this formula please?


  • Mike TV
    Mike TV ✭✭✭✭✭✭

    @SJ OSullivan

    First, create a helper column for the start and end time. They can be hidden after creating. Use this formula:

    =VALUE(SUBSTITUTE([START TIME]@row, ":00", ""))

    =VALUE(SUBSTITUTE([END TIME]@row, ":00", ""))

    For hour 8 you'll want this formula:

    =IF(AND([Start Time (helper)]@row <= 8, [End Time (helper)]@row >= 9), 1, "")

    For hour 9 you'll want this formula:

    =IF(AND([Start Time (helper)]@row <= 9, [End Time (helper)]@row >= 10), 1, "")

    And so on...

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!