![]() |
WEEKNUM
I use YEAR(cell)&WEEKNUM(cell) to organize data in time buckets. This returns
yyyyw numbers for weeks 1 through 9, which when put in a pivot table or sorted does not sort in a correct date order. Is there a way to force WEEKNUM toreturn 01 - 09 for weeks 1 thorugh 9 of a given year? -- RonB |
WEEKNUM
You can use this
=YEAR(A2)&TEXT(WEEKNUM(A2),"00") -- Regards Ron de Bruin http://www.rondebruin.nl "RonB" wrote in message ... I use YEAR(cell)&WEEKNUM(cell) to organize data in time buckets. This returns yyyyw numbers for weeks 1 through 9, which when put in a pivot table or sorted does not sort in a correct date order. Is there a way to force WEEKNUM toreturn 01 - 09 for weeks 1 thorugh 9 of a given year? -- RonB |
WEEKNUM
If you want it numeric
=--(YEAR(A2)&TEXT(WEEKNUM(A2),"00")) -- Regards Ron de Bruin http://www.rondebruin.nl "Ron de Bruin" wrote in message ... You can use this =YEAR(A2)&TEXT(WEEKNUM(A2),"00") -- Regards Ron de Bruin http://www.rondebruin.nl "RonB" wrote in message ... I use YEAR(cell)&WEEKNUM(cell) to organize data in time buckets. This returns yyyyw numbers for weeks 1 through 9, which when put in a pivot table or sorted does not sort in a correct date order. Is there a way to force WEEKNUM toreturn 01 - 09 for weeks 1 thorugh 9 of a given year? -- RonB |
WEEKNUM
Worked great! Thanks....
-- RonB "Ron de Bruin" wrote: If you want it numeric =--(YEAR(A2)&TEXT(WEEKNUM(A2),"00")) -- Regards Ron de Bruin http://www.rondebruin.nl "Ron de Bruin" wrote in message ... You can use this =YEAR(A2)&TEXT(WEEKNUM(A2),"00") -- Regards Ron de Bruin http://www.rondebruin.nl "RonB" wrote in message ... I use YEAR(cell)&WEEKNUM(cell) to organize data in time buckets. This returns yyyyw numbers for weeks 1 through 9, which when put in a pivot table or sorted does not sort in a correct date order. Is there a way to force WEEKNUM toreturn 01 - 09 for weeks 1 thorugh 9 of a given year? -- RonB |
All times are GMT +1. The time now is 04:31 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com