+ Reply to Thread
Results 1 to 6 of 6

Need Custom WeekNum and Year format

  1. #1
    Registered User
    Join Date
    03-10-2010
    Location
    Hendersonville, TN USA
    MS-Off Ver
    Excel 2010
    Posts
    43

    Question Need Custom WeekNum and Year format

    I have dates ranging between 3 years. I need the week number and year in one field for charting all three years.

    I can get the week number and I can get the year. How do I make this one result?
    Last edited by SJMaye; 03-11-2010 at 10:32 AM. Reason: Comply with forum rules

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Basic custom formatting question

    Just concatinate your two formulas with & and maybe some blanks or comma's like so
    Please Login or Register  to view this content.
    Does that work for you?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Basic custom formatting question

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.
    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  4. #4
    Registered User
    Join Date
    03-10-2010
    Location
    Hendersonville, TN USA
    MS-Off Ver
    Excel 2010
    Posts
    43

    Re: Basic custom formatting question

    Quote Originally Posted by ChemistB View Post
    Just concatinate your two formulas with & and maybe some blanks or comma's like so
    Please Login or Register  to view this content.
    Does that work for you?
    This is sort of what I have been doing, but when I try to chart the week number format is a problem. Below is my data. The date is supplied. I used YEAR, MONTH, DAY, and WEEKNUM formulas to pull the rest.

    I tried = Year&"-"&Week No. The result was 2008-7 . When trying to chart in ascending order the "7" needs to be "07" to work. For the life of me I can't force the result to be the two digits; "07".

    Date Year Month Day Week No. Wk-Yr
    2008-07-14 2008 07 14 29 ??????

    This is probably simple. I am just approaching it wrong.

    TIA

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Need Custom WeekNum and Year format

    Use TEXT, ie: =YEAR&"-"&TEXT(WeekNo,"00")

  6. #6
    Registered User
    Join Date
    03-10-2010
    Location
    Hendersonville, TN USA
    MS-Off Ver
    Excel 2010
    Posts
    43

    Smile Re: Need Custom WeekNum and Year format

    Quote Originally Posted by DonkeyOte View Post
    Use TEXT, ie: =YEAR&"-"&TEXT(WeekNo,"00")
    Worked like a charm! Thanks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1