Weeknum function for European standards...

  • Thread starter Jerry Lieuw A Joe
  • Start date
J

Jerry Lieuw A Joe

The WEEKNUM function considers the week containing January 1 to be the first
week of the year. However, there is a European standard that defines the
first week as the one with the majority of days (four or more) falling in the
new year. This means that for years in which there are three days or less in
the first week of January, the WEEKNUM function returns week numbers that are
incorrect according to the European standard.
How can I fix this problem?
 
B

Bernard Liengme

If you do a Google newsgroup search (keyword WEEKNUM, groups *EXCEL*) I am
sure you will finds lots of info.

Questions like this are best asked on one of the Excel newsgroups

best wishes
Bernard
 
B

Buscado

Hi, there I have the same problem in the pivot tables and I cannot solve my
particular problem.
You might try the vb-fucntions : Format or Datepart , as follows.
Function Myweek(Mydate)

Myweek = Format(Mydate, "ww", vbMonday, vbFirstFourDays)

End Function

This will return a date according to the ISO standard!

"Bernard Liengme" schreef:
 
Top