Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 46
Default Converting date to week number over several years

Hi,

I understand how to use the weeknum() function to conert a date to a week
number, but this is only useful if need to convert 1 year. What should I do
to convert 4 consecutive years to a week number, so all weeks numbers are not
the same. e.g I want to make January 1st 2006 as week '1' and January 1st
2007 '53' instead of 1 again. Thanks very much.


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Converting date to week number over several years

With the date in A1
=ROUNDUP(DATEDIF(DATE(2006,1,0),A1,"d")/7,0)

If this post helps click Yes
---------------
Jacob Skaria


"spudsnruf" wrote:

Hi,

I understand how to use the weeknum() function to conert a date to a week
number, but this is only useful if need to convert 1 year. What should I do
to convert 4 consecutive years to a week number, so all weeks numbers are not
the same. e.g I want to make January 1st 2006 as week '1' and January 1st
2007 '53' instead of 1 again. Thanks very much.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 46
Default Converting date to week number over several years

Absolute genius. Works perfectly. saved me hours and hours. Thanks a million.

"Jacob Skaria" wrote:

With the date in A1
=ROUNDUP(DATEDIF(DATE(2006,1,0),A1,"d")/7,0)

If this post helps click Yes
---------------
Jacob Skaria


"spudsnruf" wrote:

Hi,

I understand how to use the weeknum() function to conert a date to a week
number, but this is only useful if need to convert 1 year. What should I do
to convert 4 consecutive years to a week number, so all weeks numbers are not
the same. e.g I want to make January 1st 2006 as week '1' and January 1st
2007 '53' instead of 1 again. Thanks very much.


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Converting date to week number over several years

.... or just =ROUNDUP((A1-DATE(2006,1,0))/7,0) ?
--
David Biddulph

"Jacob Skaria" wrote in message
...
With the date in A1
=ROUNDUP(DATEDIF(DATE(2006,1,0),A1,"d")/7,0)

If this post helps click Yes
---------------
Jacob Skaria


"spudsnruf" wrote:

Hi,

I understand how to use the weeknum() function to conert a date to a week
number, but this is only useful if need to convert 1 year. What should I
do
to convert 4 consecutive years to a week number, so all weeks numbers are
not
the same. e.g I want to make January 1st 2006 as week '1' and January 1st
2007 '53' instead of 1 again. Thanks very much.




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
Converting Date to Day of Week QuestGAV Excel Worksheet Functions 3 October 22nd 05 01:43 AM
Converting Date to Work Week... PokerZan Excel Discussion (Misc queries) 4 September 1st 05 09:47 PM
How can I convert a date into a week number... msbutton27 Excel Worksheet Functions 7 May 25th 05 09:44 PM
Converting number of days to years and months Dave Cobb Excel Worksheet Functions 4 May 24th 05 09:14 PM
I need week number in excell from a date, first week must be mini. jPeich Excel Discussion (Misc queries) 4 January 5th 05 01:21 AM


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