Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
WickyWick
 
Posts: n/a
Default Convert week number into calendar month?

I'm attempting to calculate a manufacture date from a serial number. The
serial number has the year, week number, and day of the week. For example,
3447 would be decoded like this: 3=year(2003), 44=week number, and
7=weekday(Saturday). Basically, the year and weekday are easy to place within
a formula. It's calculating the month from the week number that I'm having
the problem with. Anyone have any idea as to how I might handle this
situation?

Thanks for your help!
  #2   Report Post  
Daniel.M
 
Posts: n/a
Default

Hi,

Depends on your definition of a week (http://www.cpearson.com/excel/weeknum.htm)

Also, assuming you always have YWWD format, so that 10011 would return the first
Sunday of first week of 2009 : Sun 2010-01-03

Something like:

=DATE(INT(A1/1000)+2000,1,1)-WEEKDAY(DATE(INT(A1/1000)+2000,1,))+7*MOD(INT(A1/10
),100)+MOD(A1,10)-1

If it doesn't return the proper results, please provide more data and expected
results.

Regards,

Daniel M.

"WickyWick" wrote in message
...
I'm attempting to calculate a manufacture date from a serial number. The
serial number has the year, week number, and day of the week. For example,
3447 would be decoded like this: 3=year(2003), 44=week number, and
7=weekday(Saturday). Basically, the year and weekday are easy to place within
a formula. It's calculating the month from the week number that I'm having
the problem with. Anyone have any idea as to how I might handle this
situation?

Thanks for your help!




  #3   Report Post  
Daniel.M
 
Posts: n/a
Default

Hi,

Sunday of first week of 2009 : Sun 2010-01-03

I meant: Sunday of first week of 2010

If you don't care about weeks and only want the WW occurence of D (d=1 for Sun
and 7 for Sat) within the year YY (10056) : fifth Friday of Year 2010 : Fri
2010-01-29

=DATE(INT(A1/1000)+2000,1,1)-WEEKDAY(DATE(INT(A1/1000)+2000,1,
1-MOD(A1,10)))+7*MOD(INT(A1/10),100)

Regards,

Daniel M.


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
how to get week number in month in excel ? ikin Charts and Charting in Excel 2 January 16th 05 05:54 PM
How do I convert a serial number to the month, day, and year in E. Judy Excel Discussion (Misc queries) 2 December 15th 04 03:38 PM
Returning the Week Number of a Specific Date on a Month arjcvg Excel Worksheet Functions 0 November 5th 04 01:21 AM
Returning the Week Number of a Specific Date on a Month arjcvg Excel Worksheet Functions 1 November 3rd 04 04:35 AM
Returning the Week Number of a Specific Date on a Month arjcvg Excel Worksheet Functions 0 November 3rd 04 04:26 AM


All times are GMT +1. The time now is 01:23 PM.

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"