Weeknum function

M

madhatter_scfc

I've been creating a spreadsheet that takes figures from specific date
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 patc
but no joy
 
S

swatsp0p

I think you forgot about Jan 1, 2005. Being on a Saturday, that count
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 o
Sunday (1) or on Monday (2). e.g. =WEEKNUM(C18,2) means weeks begin o
Monday.

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

HTH

Bruc
 
B

Bob Phillips

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"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top