Displaying a date range derived from WEEKNUM

G

Guest

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?
 
R

Rick Rothstein \(MVP - VB\)

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
 
G

Guest

Absolutely brilliant.
Thanks very much.



Jock


Rick Rothstein (MVP - VB) said:
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
 
R

Rick Rothstein \(MVP - VB\)

How can I calculate and display the actual dates (workdays, not incl
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top