Need to Figure out # of days each emplyee is on leave in a given month
Hi Everyone,
I'm working on a work days calculation for a given month, for that I need to calculate the leave days for a given month. Below is my grid.
- Orage colors columns is in different sheet - Leave requests are updated here and green color columns is in different sheet - Need to figure out total # of days on leave in a given month per employee.
- I need to exclude week ends
- Return date is actual date were emplyee return from leave, hence I need to exclude that day
- Expected results already updated under April and May month
Can any one help me out from this?
Answers
-
Any luck here @Paul Newcome @Andrée Starå @Genevieve P.
-
You could add a helper column on your main source sheet the returns the working days per row as an automatic calculation.
Assuming the end date will always be a working day, you could do a very simple calculation of:
=NETWORKDAYS([Start Date]@row, [Return Date]@row) - 1
Then in your second sheet you can use SUMIFS to SUM the value in your helper column by the name:
=SUMIFS({Helper Column with numbers}, {Name column}, [Name Column]@row, {Start Date Column}, IFERROR(MONTH(@cell), 0) = 4)
However this won't work if you have a row where the Start Date is in one month but the End Date is in another. ( e.g. Wed 31-May to Fri 02-Jun).
Is there a reason you need the calculations to be in a second sheet? What you could do is have all of your Month columns in this current sheet so we can do a row evaluation that way. Then you could use a Report to Group and Summarize based on specific filters.
Thanks!
GenevieveJoin us at Smartsheet ENGAGE 2024 🎉
October 8 - 10, Seattle, WA | Register now
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 62.3K Get Help
- 361 Global Discussions
- 199 Industry Talk
- 427 Announcements
- 4.4K Ideas & Feature Requests
- 136 Brandfolder
- 127 Just for fun
- 128 Community Job Board
- 444 Show & Tell
- 28 Member Spotlight
- 1 SmartStories
- 283 Events
- 35 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!