#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default 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,



  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default 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,





  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 457
Default 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,







Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Holiday Farhad Excel Discussion (Misc queries) 2 October 29th 09 06:05 PM
how do I add words, holiday =1, holiday am=0.5 GCC Excel Worksheet Functions 2 March 6th 07 03:53 PM
Holiday Planner show holiday taken? Mac5 Excel Worksheet Functions 0 July 18th 06 11:29 PM
Holiday Dates Alpur Excel Worksheet Functions 3 November 16th 05 06:14 PM
Holiday Pay johnrann New Users to Excel 5 July 17th 05 02:33 PM


All times are GMT +1. The time now is 12:47 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"