#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 709
Default Formula Help

If say January 1st falls on a Sunday but paid holiday is on the first
"weekday", which is Monday of 2006. How would you rewrite this formula for it
to reflect future changes year after year. This formula is what I'm using
now, which works fine as long as the dates don't fall on a weekend.
=Date(TheYear,1,1) I'd like to enter this formula as is but for it to
actually be =Date(TheYear,1,2) What this is? It's a calender that keeps track
of all the paid holidays, vacation time, meetings and such. Thanks in advance
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Formula Help


This formula will give the date of the first Monday of a year shown in
A1

=DATE(A1,1,8)-WEEKDAY(DATE(A1,1,6))


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=559275

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 180
Default Formula Help

You didn't say what should happen if Jan 1 is a Saturday. Is Dec 31 the
holiday? If that's the case then:
=DATE(TheYear,1,1)+CHOOSE(WEEKDAY(DATE(TheYear,1,1 ),1),1,0,0,0,0,0,-1)
should do. It figures out what day of the week is Jan 1 then uses the
choose function to add one for Sunday and subtract one for Saturday. You can
adjust the list of values (1,0,0,...,-1) if that assumption is wrong for your
firm.

"Richard" wrote:

If say January 1st falls on a Sunday but paid holiday is on the first
"weekday", which is Monday of 2006. How would you rewrite this formula for it
to reflect future changes year after year. This formula is what I'm using
now, which works fine as long as the dates don't fall on a weekend.
=Date(TheYear,1,1) I'd like to enter this formula as is but for it to
actually be =Date(TheYear,1,2) What this is? It's a calender that keeps track
of all the paid holidays, vacation time, meetings and such. Thanks in advance

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Formula Help


Sorry, I see you want first weekday of the year. You could do that with
WORKDAY function from Analysis ToolPak

=WORKDAY(DATE(A1,1,0),1)

format as date

again where A1 contains the year


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=559275

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
Match then lookup Tenacity Excel Worksheet Functions 9 December 3rd 05 05:30 AM
Formula Problem - interrupted by #VALUE! in other cells!? Ted Excel Worksheet Functions 17 November 25th 05 05:18 PM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 03:28 AM
Creating a check mark box MarthaSue Setting up and Configuration of Excel 18 April 28th 05 12:31 AM
Match / Vlookup within an Array formula Hari Prasadh Excel Discussion (Misc queries) 3 February 3rd 05 04:37 PM


All times are GMT +1. The time now is 07:31 AM.

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

About Us

"It's about Microsoft Excel"