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 |
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 |
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 |
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 |
All times are GMT +1. The time now is 11:36 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com