Formula that combine names that falls into the selected dates

Options
Christina09
Christina09 ✭✭✭✭✭✭
edited 06/27/23 in Formulas and Functions

Hi,

I have a sheet on which employee will submit their PTO request.

The column "Team PTO" shows who else is having PTO during their requested dates within their department. Here's the formula: =JOIN(DISTINCT(COLLECT(Employee:Employee, [PTO Start Date]:[PTO Start Date], >=[PTO Start Date]@row, [PTO End Date]:[PTO End Date], <=[PTO End Date]@row, Department:Department, =Department@row, [Cancel PTO]:[Cancel PTO], <>1, Employee:Employee, <>Employee@row)), "; ")

It seems like it's not working properly. Can someone enlighten me on how to fix it?

Thanks.


Tags:

Answers

  • Christina09
    Christina09 ✭✭✭✭✭✭
    Options

    I think I figured it out.

    Here's a formula if anyone wants to build their team PTO request sheet:

    =JOIN(DISTINCT(COLLECT(Employee:Employee, [PTO Start Date]:[PTO Start Date], <=[PTO End Date]@row, [PTO End Date]:[PTO End Date], >=[PTO Start Date]@row, Department:Department, =Department@row, [Row ID]:[Row ID], <>[Row ID]@row, [Cancel PTO]:[Cancel PTO], <>1, Employee:Employee, <>Employee@row)), "; ")

  • Genevieve P.
    Genevieve P. Employee Admin
    Options

    Hey @Christina09

    Thanks for sharing your solution!

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!