Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Jon Jon is offline
external usenet poster
 
Posts: 183
Default [newbie] first day of week

1. I would like to return the first calendar day of a week number and the
last calendar day of a week number, any ideas?

For example, I have week numbers 11 and 12 and I would like to return

- the first Monday of week 11
- the last Sunday of week 12

2. Any idea if it is possible to keep a 'table' of holidays for working days?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,510
Default [newbie] first day of week

Hi Jon,

I suggest that you set up the following as a test in a new workbook and see
if it returns the info that you want.

Assume the following:-

Cell A2 contains the date Jan 1 2009

Cell B2 contains any date in 2009.

Cell C2 contains the following formula to calculate the week number with Mon
as the first day of the week:
=WEEKNUM(B2,2)

Cell D2 contains the following formula to calculate date of 1st day of week
number:-
=(C2-1)*7+$A$2-WEEKDAY($A$2)+2

Cell E2 contains the following formula to calculate date of last day of week
number:-
=(C2-1)*7+$A$2-WEEKDAY($A$2)+8

Note that I have made A2 in the formula absolute with the $ signs. this will
allow you to insert Jan 1 2009 in A2 then insert the other formulas in B2,
C2, D2 and E2 and then Autofill (drag) the formulas in those cells down and
you will be able to view the results for other dates.

I suggest that you format all DATE columns as ddd mmm dd yyyy so that you
can view the days of the week with the dates. Column C needs to be formatted
as a number so you can see the week number.

Someone else might be able to simplify the formula for you but it appears to
return the correct results under test.

--
Regards,

OssieMac


"Jon" wrote:

1. I would like to return the first calendar day of a week number and the
last calendar day of a week number, any ideas?

For example, I have week numbers 11 and 12 and I would like to return

- the first Monday of week 11
- the last Sunday of week 12

2. Any idea if it is possible to keep a 'table' of holidays for working days?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,510
Default [newbie] first day of week

My apologies Jon. I forgot to answer your second question.

Lookup NETWORKDAYS function. I think you will find sufficient info there to
create your holidays table and be able to calculate work days. (Assuming that
is what you need.)

--
Regards,

OssieMac


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 225
Default [newbie] first day of week

Try
=DATE(YEAR(TODAY()),1,1)+CHOOSE(WEEKDAY(DATE(YEAR( TODAY()),1,1),2),1,-1,-2,-3,-4,-5,2)+(B1-1)*7

with weeknumber in B1 for Mond... add 6 to get Sun

For week 1/53... it will may give last/first Monday of previous/next year...

"Jon" wrote:

1. I would like to return the first calendar day of a week number and the
last calendar day of a week number, any ideas?

For example, I have week numbers 11 and 12 and I would like to return

- the first Monday of week 11
- the last Sunday of week 12

2. Any idea if it is possible to keep a 'table' of holidays for working days?

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
Convert regular Date to Week Ending or Week Beginning Dates Sam H Excel Discussion (Misc queries) 5 April 3rd 23 04:39 PM
Auto calculate day of week to week of the year (not as serial) oftenconfused Excel Discussion (Misc queries) 4 June 23rd 08 05:14 PM
Real Newbie newbie question Dave New Users to Excel 0 January 10th 07 07:55 PM
How do I set up a week by week skill training schedule in excel? davidwatts Excel Discussion (Misc queries) 0 June 16th 05 11:32 PM
I need week number in excell from a date, first week must be mini. jPeich Excel Discussion (Misc queries) 4 January 5th 05 01:21 AM


All times are GMT +1. The time now is 03:30 PM.

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"