A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Calculate Holiday



 
 
Thread Tools Display Modes
  #1  
Old May 17th, 2010, 02:07 PM posted to microsoft.public.excel.misc
Johnny[_9_]
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  
Old May 17th, 2010, 03:07 PM posted to microsoft.public.excel.misc
T. Valko
external usenet poster
 
Posts: 15,759
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  
Old May 17th, 2010, 03:56 PM posted to microsoft.public.excel.misc
Luke M[_4_]
external usenet poster
 
Posts: 451
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,







 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:58 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.