weeknum formatting

T

Terri

I need to format the week of the year as 200617 (YYYYWW). Any Ideas?
I tried using the custom format under Format but it dispays as 2006ww.
Is there a way to format as 200617 (Year 2006 & Week 17)?
 
K

Kevin B

You can use a formula to get that result, but not a format.

The formula below concatenates the current year from a date, and the
current week from the date:

=Year(a1)&Weeknum(a1)

So if A1 had the date of 05/01/2006 and you put the formula in B1 the result
would be 200618
 
T

TKnTexas

You might want to do the formula as year(a1)&right("0"&weeknum(a1),2)
which will give you a result that is always six digits.
 
Top