ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Translate WEEKNUM result into a date (https://www.excelbanter.com/excel-worksheet-functions/44364-translate-weeknum-result-into-date.html)

Wil

Translate WEEKNUM result into a date
 
I would like to know how to convert/translate the numeric value that WEEKNUM
returns into a date format. What is the best way to do this?

Paul Sheppard


Wil Wrote:
I would like to know how to convert/translate the numeric value that
WEEKNUM
returns into a date format. What is the best way to do this?


Hi Wil

Might be missing something here but WEEKNUM converts the date to the
week number, therefore you already have the date


--
Paul Sheppard


------------------------------------------------------------------------
Paul Sheppard's Profile: http://www.excelforum.com/member.php...o&userid=24783
View this thread: http://www.excelforum.com/showthread...hreadid=465793


Ron Rosenfeld

On Wed, 7 Sep 2005 18:25:02 -0700, Wil wrote:

I would like to know how to convert/translate the numeric value that WEEKNUM
returns into a date format. What is the best way to do this?


If you change the numeric value returned by WEEKNUM to a date format, you will
display a date in the year 1900 or 1904.

To convert that value, merely select Format/Cells/Number Date (and choose one
of those options). Or use the formula =TEXT(wn,"dd-mmm-yyyy") or some other
format.

Maybe you mean something else?

For example, perhaps you mean "what date does a weeknum of 'numeric_value'
represent"?

If that is the case, then you have to specify both the year, as well as which
day of the week you want returned. Weeknum considers Jan 1 as being the first
day of Week 1; and the next Sunday (or Monday) as being the first day of week
2.

Once you specify your parameters, performing the conversion is simply a matter
of adding 7*wn to Jan 1 of the relevant year, and then adjusting for the day of
the week you wish to return; as well as whether or not Week 1 is a partial week
or a full week.


--ron


All times are GMT +1. The time now is 02:50 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com