#1   Report Post  
madhatter_scfc
 
Posts: n/a
Default Weeknum function


I've been creating a spreadsheet that takes figures from specific dates
and summarises into weeks and came accross this problem..
E.g.

=WEEKNUM("20/9/2005")
returns '39'.. it is however week 38!

However, using dates from last year e.g.
=weeknum("14/10/2004")
it returns the correct week 42.

Is it me or is this a bug?... i've tried looking for some sort of patch
but no joy!


--
madhatter_scfc
------------------------------------------------------------------------
madhatter_scfc's Profile: http://www.excelforum.com/member.php...o&userid=27255
View this thread: http://www.excelforum.com/showthread...hreadid=469294

  #2   Report Post  
swatsp0p
 
Posts: n/a
Default


I think you forgot about Jan 1, 2005. Being on a Saturday, that counts
as week 1. Jan. 2 becomes week 2... Sept 20 is in week 39.

Enter those dates and use your formula on them to see.

Also, WEEKNUM has a parameter to determine if your weeks begin on
Sunday (1) or on Monday (2). e.g. =WEEKNUM(C18,2) means weeks begin on
Monday.

Won't change Sept. 20's week, though, as that is a Tuesday.

HTH

Bruce


--
swatsp0p


------------------------------------------------------------------------
swatsp0p's Profile: http://www.excelforum.com/member.php...o&userid=15101
View this thread: http://www.excelforum.com/showthread...hreadid=469294

  #3   Report Post  
Bob Phillips
 
Posts: n/a
Default

You mean ISO week number

=INT((B4-DATE(YEAR(B4-WEEKDAY(B4-1)+4),1,3)+WEEKDAY(DATE(YEAR(B4-WEEKDAY(B4-
1)+4),1,3))+5)/7)

--
HTH

Bob Phillips

"madhatter_scfc"
<madhatter_scfc.1vobic_1127246705.9655@excelforu m-nospam.com wrote in
message news:madhatter_scfc.1vobic_1127246705.9655@excelfo rum-nospam.com...

I've been creating a spreadsheet that takes figures from specific dates
and summarises into weeks and came accross this problem..
E.g.

=WEEKNUM("20/9/2005")
returns '39'.. it is however week 38!

However, using dates from last year e.g.
=weeknum("14/10/2004")
it returns the correct week 42.

Is it me or is this a bug?... i've tried looking for some sort of patch
but no joy!


--
madhatter_scfc
------------------------------------------------------------------------
madhatter_scfc's Profile:

http://www.excelforum.com/member.php...o&userid=27255
View this thread: http://www.excelforum.com/showthread...hreadid=469294



  #4   Report Post  
madhatter_scfc
 
Posts: n/a
Default


It was me then!

Thanks for your help Bruce.


--
madhatter_scfc
------------------------------------------------------------------------
madhatter_scfc's Profile: http://www.excelforum.com/member.php...o&userid=27255
View this thread: http://www.excelforum.com/showthread...hreadid=469294

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
Excel option to store trendline's coefficients in cells for use Miguel Saldana Charts and Charting in Excel 9 June 20th 05 08:45 PM
weeknum function says jan1=week1, mod to first 4 day week needed sam Excel Discussion (Misc queries) 3 June 13th 05 04:05 PM
weeknum function returns name error Unison Mike Excel Worksheet Functions 4 May 24th 05 09:27 PM
Automatically up date time in a cell Mark Excel Discussion (Misc queries) 5 May 12th 05 12:26 AM
clock Wildman Excel Worksheet Functions 2 April 26th 05 10:31 AM


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