kweaver
Well-known Member
- Joined
- May 12, 2009
- Messages
- 2,934
- Office Version
- 365
- 2010
In a scheduling application, I have a rows (representing weeks in a month) for people-shifts with 7 columns (days of the week, cols B to H).
The cells in a row will have names of people. There are 20 people to choose from using drop downs.
The people get drive-time compensation. That's the tricky issue.
If in week 1, for example, a given person works on Friday and Sunday (i.e., not contiguous days), he doesn't stay overnight, so he's counted twice to get drive-time compensation for Friday (coming and going) and for Sunday (coming and going).
If, however, in a given week, this person works Monday, Tuesday, and Wednesday, he stays overnight for 2 nights and he's only counted twice for drive-time compensation (coming on Monday and leaving on Wednesday).
I need to know this situation for each person for each week. Ideally, it sounds like a UDF to me that looks for a (each, ultimately) person in a given week, but I cannot wrap my head around it.
Would appreciate the brain-trust offering any suggestions on how I might do this.
The cells in a row will have names of people. There are 20 people to choose from using drop downs.
The people get drive-time compensation. That's the tricky issue.
If in week 1, for example, a given person works on Friday and Sunday (i.e., not contiguous days), he doesn't stay overnight, so he's counted twice to get drive-time compensation for Friday (coming and going) and for Sunday (coming and going).
If, however, in a given week, this person works Monday, Tuesday, and Wednesday, he stays overnight for 2 nights and he's only counted twice for drive-time compensation (coming on Monday and leaving on Wednesday).
I need to know this situation for each person for each week. Ideally, it sounds like a UDF to me that looks for a (each, ultimately) person in a given week, but I cannot wrap my head around it.
Would appreciate the brain-trust offering any suggestions on how I might do this.