#1   Report Post  
Posted to microsoft.public.excel.misc
Terri
 
Posts: n/a
Default weeknum formatting

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)?
  #2   Report Post  
Posted to microsoft.public.excel.misc
Kevin B
 
Posts: n/a
Default weeknum formatting

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
--
Kevin Backmann


"Terri" wrote:

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)?

  #3   Report Post  
Posted to microsoft.public.excel.misc
TKnTexas
 
Posts: n/a
Default weeknum formatting

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.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional Formatting using Formulas and WEEKNUM Kirk Excel Discussion (Misc queries) 7 April 16th 09 03:19 PM
difficulty with conditional formatting Deb Excel Discussion (Misc queries) 0 March 23rd 05 06:13 PM
conditional formatting question Deb Excel Discussion (Misc queries) 0 March 23rd 05 02:07 AM
Copy conditional formatting across multiple rows? Gil Excel Discussion (Misc queries) 1 January 11th 05 11:27 AM
Conditional formatting not available in Excel BAB Excel Discussion (Misc queries) 2 January 1st 05 03:33 PM


All times are GMT +1. The time now is 04:19 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"