Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 440
Default Displaying a date range derived from WEEKNUM

How can I calculate and display the actual dates (workdays, not incl weekends
preferred but not essential) in, say, column A which refer to WEEKNUM in
column B?
--
tia

Jock
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,202
Default Displaying a date range derived from WEEKNUM

How can I calculate and display the actual dates (workdays, not incl
weekends
preferred but not essential) in, say, column A which refer to WEEKNUM in
column B?


Let us assume that the year number is in A1 and that the week number is in
B1. To list the 5 weekdays in that week number, put this formula

=DATE($A$1,1,1+MOD((9-MOD(WEEKDAY(DATE($A$1,1,1)),7)),7))+7*($B$1-1)+ROWS($1:1)-1

in any cell and drag down through the next 4 cells.

Rick

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 440
Default Displaying a date range derived from WEEKNUM

Absolutely brilliant.
Thanks very much.



Jock


"Rick Rothstein (MVP - VB)" wrote:

How can I calculate and display the actual dates (workdays, not incl
weekends
preferred but not essential) in, say, column A which refer to WEEKNUM in
column B?


Let us assume that the year number is in A1 and that the week number is in
B1. To list the 5 weekdays in that week number, put this formula

=DATE($A$1,1,1+MOD((9-MOD(WEEKDAY(DATE($A$1,1,1)),7)),7))+7*($B$1-1)+ROWS($1:1)-1

in any cell and drag down through the next 4 cells.

Rick


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,202
Default Displaying a date range derived from WEEKNUM

How can I calculate and display the actual dates (workdays, not incl
weekends
preferred but not essential) in, say, column A which refer to WEEKNUM in
column B?


Let us assume that the year number is in A1 and that the week number is in
B1. To list the 5 weekdays in that week number, put this formula

=DATE($A$1,1,1+MOD((9-MOD(WEEKDAY(DATE($A$1,1,1)),7)),7))+7*($B$1-1)+ROWS($1:1)-1

in any cell and drag down through the next 4 cells.


Looks like we can simplify that expression a little bit...

=DATE($A$1,1,1+MOD(9-MOD(DATE($A$1,1,1),7),7))+7*($B$1-1)+ROWS($1:1)-1

Rick

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
Date format and weeknum formel svemor Excel Discussion (Misc queries) 8 January 16th 07 05:45 PM
Displaying range value when range name is concatenated Barb Reinhardt Excel Discussion (Misc queries) 5 November 6th 06 06:11 PM
WEEKNUM to dynamic range name additude Excel Worksheet Functions 5 July 23rd 06 08:12 PM
Convert WeekNum to Sunday's date Terri Excel Worksheet Functions 3 March 27th 06 09:36 PM
Translate WEEKNUM result into a date Wil Excel Worksheet Functions 2 September 8th 05 01:26 PM


All times are GMT +1. The time now is 12:59 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"