![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: May 2002
Posts: 4
|
how do i do the opposite of the weeknum function? that is, i have a cell with a week number in it, and want to be able to get a date for that week.
thanks |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Apr 2002
Location: N.E. Ohio
Posts: 236
|
(weeknum * 7) + 1/1/02
|
|
|
|
|
|
#3 |
|
MrExcel MVP
Join Date: Mar 2002
Location: Michigan USA
Posts: 11,452
|
Hi zzyddhf:
Just an editorial correction ... =weeknum*7+"1/1/02" Regards! NB: You may also have to adjust it down by 1 week ... depending upon what you are looking for [ This Message was edited by: Yogi Anand on 2002-05-24 11:53 ] |
|
|
|
|
|
#4 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Denver, CO
Posts: 1,744
|
assuming year of interest in B1 and weeknumber in A1, you could use
=DATE(B1,1,A1*7-(DAY(DATE(B1,1,1)+7-WEEKDAY(DATE(B1,1,1),2)))-1) to provide the monday of the week. good luck Edit Since Weeknum(a1) defaults to the Sunday start date, Sunday may be more approriate, simply tweek to =DATE(B1,1,A1*7-(DAY(DATE(B1,1,1)+7-WEEKDAY(DATE(B1,1,1),2)))-2) [ This Message was edited by: IML on 2002-05-24 11:57 ] |
|
|
|
|
|
#5 |
|
New Member
Join Date: May 2002
Posts: 4
|
thanks. works when putting 1/1/02 in quotation marks. otherwise, returns date with year 2000.
|
|
|
|
|
|
#6 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Denver, CO
Posts: 1,744
|
Quote:
|
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|