The list of functions that I had written were meant as a way to be able to call those functions to calculate the various dates. Yes, you are right, there are other parts to the code. I still have yet to complete my Holiday/WorkDay/NetWorkdays VBA equivalent code as I still need to put in some different options too.
The thought process is this. The company has a list of holidays they recognize every year. Rather than putting in dates (which would require changing every year), why not use the names of the holidays, then call the function by name to calculate their dates.
We still have 2 other issues to address. First, the fixed holidays at times are on weekends while other times are on weekdays. The question then becomes, how do we handle the holiday pay for those dates that falls on a non-business day (normally on Saturday or Sunday)? Do we move the paid holiday to the previous, next, or closest normal business day and mark that day as a non-business day?
Now that we mentioned the first issue, the second issue would be dealing with how to group holidays when you have multiple holidays so close together. Do you want to apply the first rule that was used or do you want to group the holidays as close to each other as possible.
Example:
Christmas Eve, Christmas, New Years Eve, and New Years are all holidays for me. In 2005/2006, all 4 of these holidays will fall on Saturday and Sunday. How would we like to set the paid holidays? Do we apply the first rule as discussed above, or do we want to group these holidays as close together as possible when they fall on a non-business day.
If we use the closest rule, paid holidays would be 12/23/2005, 12/26/2005, 12/30/2005, 1/2/2006. Now, if we want to group them together, so as employees would only need to take 1 vacation day for that week and still be able to enjoy their 9 days off (12/24/2005 - 1/1/2006) while getting their vacation/holiday pay, why not group them like 12/26/2005, 12/27/2005, 12/29/2005, and 12/30/2005. This is the part that I have not coded at this point of time. This is where my thought process has come from.
Ronald R. Dodge, Jr.
Production Statistician
Master MOUS 2000