# formula help.

Options
✭✭

HI all

I am running a holiday calendar on smartsheet and looking to increase its functionality.

I'm currently trying to write a formula using a countifs were if employee A puts a holiday request through it checks all of employee A previous entries to see if it clashes with a previous entry.

the formula i'm using isn't right and any suggestions on where to go with it would be great as my tiny mind is going to explode.

The columns i'm checking are start date, end date and employee name.

current formula

=COUNTIFS([EMPLOYEE NAME]:[EMPLOYEE NAME], [EMPLOYEE NAME]@row, [START DATE]:[START DATE], >=[START DATE]@row, [START DATE]:[START DATE], <=[END DATE]@row)

• ✭✭✭✭✭✭
Options

Very close. Try this...

=COUNTIFS([EMPLOYEE NAME]:[EMPLOYEE NAME], [EMPLOYEE NAME]@row, [END DATE]:[END DATE], >=[START DATE]@row, [START DATE]:[START DATE], <=[END DATE]@row)

This will give you the count of how many rows for that employee have any kind of date overlap at all. 1 means there is no overlap (as the current row will still fall within the criteria in the formula).

• ✭✭✭✭✭✭
Options

Very close. Try this...

=COUNTIFS([EMPLOYEE NAME]:[EMPLOYEE NAME], [EMPLOYEE NAME]@row, [END DATE]:[END DATE], >=[START DATE]@row, [START DATE]:[START DATE], <=[END DATE]@row)

This will give you the count of how many rows for that employee have any kind of date overlap at all. 1 means there is no overlap (as the current row will still fall within the criteria in the formula).

• ✭✭
Options

you sir are what you would call a "LEGEND". I could not work out what was wrong.

thanks.

• ✭✭✭✭✭✭
Options

Happy to help. 👍️

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!