• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

WEEKNUM function does not work

Guys,

Im using the WEEKNUM function to transfer a date to a weeknum.

In cell A2 I have a data ("29-12-2007") but when I enter =WEEKNUM(A2, 1) in in B2 i get "22-02-1900" instead of the weeknumber. A

Any thoughts what goes wrong here?
 
The primary issue here I see is the formatting of the data..the value is supposed to be in MM/DD/YYYY format to have this function to produce a result..
 
You can use the following formula to convert this text driven date value into mm/dd/yyyy format

Code:
 =DATE(RIGHT(A1,4),MID(A1,FIND("-",A1)+1,2),LEFT(A1,2))

You can replace the cell Address A1 with the cell that contains this date value in textual format
 
Last edited:
Hi,

If you have valid date 29/12/2007 and you are getting WeekNumber as 21/02/1900, I think there is no issue except format; you just need to format it to General or number. Result would be 52.

Regards,
 
Cell B2 is formatted as a date

Select B2
Change the number format to , or apply a custom number format of 0
 
Back
Top