Results 1 to 4 of 4
  1. #1
    3 Star Lounger
    Join Date
    Aug 2004
    Posts
    361
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Converting number to Dates (Excel XP)

    I have a bunch of historical data that includes dates that have been inserted in a number format 1956-01, 1956-02,1956-03 for example. Is there an easy way to convert them to date format such as 1956-Jan, 1956-Feb? Have 50 years of data and I sure don't want to do each one individually. Thanks.

    Thanks.

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Converting number to Dates (Excel XP)

    If the data starts in A1 and goes down the column you can use this in B1
    =DATE(LEFT(A1,4),RIGHT(A1,2),1)

    Format - cells - custom:
    yyyy-mmm

    And copy this down the column. The copy column b, Paste -special values and afterwards you can delete colu A.

    Steve

  3. #3
    3 Star Lounger
    Join Date
    Aug 2004
    Posts
    361
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Converting number to Dates (Excel XP)

    Thanks Steve. Works like a charm. I have attached a small sample of the spreadsheet. In column D, I am using =Month(B4) to extract the month in a mmm format. Note that all months are reporting JAN. Why does it not pick up the correct month from the cells in column B? The formula =Year(b4) in column C picks up the correct year.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Converting number to Dates (Excel XP)

    The MONTH function returns a number in the range 1, 2, ..., 12. It makes no sense to format this number as mmm. If you want to see the month name, use the formula =B1 etc. and format as mmm, or use
    =TEXT(B1,"mmm") and format as General.

Posting Permissions

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