ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Calculate Holiday (https://www.excelbanter.com/excel-discussion-misc-queries/263921-calculate-holiday.html)

Johnny[_5_]

Calculate Holiday
 
I need a forumula to autimatically caculate the actual date that employees
are off for Christmas based on the year. If the holiday falls on a Saturday,
then Friday is the day off. If on a Sunday, then Monday is the day off.

For example, Chirstmas in 2010 falls on a Saturday. The foruma needs to
return 12/24/10 as the day off. If I change the year to 2011, the day off
would fall on 12/26/10.

Hopefully the forumual would translate for Thanksgiving, Independence Day
and New Year's day as well.

Thank you,




T. Valko

Calculate Holiday
 
Try this...

A1 = some date

=A1+LOOKUP(WEEKDAY(A1,2),{1,6,7},{0,-1,1})

--
Biff
Microsoft Excel MVP


"Johnny" wrote in message
...
I need a forumula to autimatically caculate the actual date that employees
are off for Christmas based on the year. If the holiday falls on a
Saturday,
then Friday is the day off. If on a Sunday, then Monday is the day off.

For example, Chirstmas in 2010 falls on a Saturday. The foruma needs to
return 12/24/10 as the day off. If I change the year to 2011, the day off
would fall on 12/26/10.

Hopefully the forumual would translate for Thanksgiving, Independence Day
and New Year's day as well.

Thank you,






Luke M[_4_]

Calculate Holiday
 
While Biff's formula can easily be applied Independence Day and New Years,
Thanksgiving is a holiday that is always on the same day (but not date).

--
Best Regards,

Luke M
"T. Valko" wrote in message
...
Try this...

A1 = some date

=A1+LOOKUP(WEEKDAY(A1,2),{1,6,7},{0,-1,1})

--
Biff
Microsoft Excel MVP


"Johnny" wrote in message
...
I need a forumula to autimatically caculate the actual date that employees
are off for Christmas based on the year. If the holiday falls on a
Saturday,
then Friday is the day off. If on a Sunday, then Monday is the day off.

For example, Chirstmas in 2010 falls on a Saturday. The foruma needs to
return 12/24/10 as the day off. If I change the year to 2011, the day
off
would fall on 12/26/10.

Hopefully the forumual would translate for Thanksgiving, Independence Day
and New Year's day as well.

Thank you,









All times are GMT +1. The time now is 01:53 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com