View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.misc
tom tom is offline
external usenet poster
 
Posts: 570
Default Problem with formula

If M2 contains 1/1/07, then WEEKNUM(M2-1) will return the week number for
12/31/06, which is 53. Why are you subtracting 1 from the date?

Tom

"Nleric" wrote:

Hi,
thanks for your reply, I got 2006_w53 also but was expecting 2007_w01,
Regards,
Noel

"Nleric" wrote:

Hi,
I am using Excel 2003 and am using this formula for converting dates
(21/07/2003)
to the following format 2003_w30. But for 2007 instead of giving me 2007_w01
I get 2006_w53, can some have a look at the formula and correct it?
=YEAR(M2)&TEXT(WEEKNUM(M2-1),"""_w""00")

Regards,
Noel LAckey.