Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Jul 2001
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Format Month from String (2000)

    This seems so easy... but it's killing me.

    Cell A1 has a string, value "200206", representing year 2002, and month 06 (June).

    I want to put a formula in cell A2 that will look to the contents of cell A1 and display "June 2002". When A1 has "200112", A2 should display "December 2001".

    It seems simple, but it has eluded me. I can get it to go with the CHOOSE function, but that requires me to put in the values for each of the months. I'm trying to use the FORMAT(WhateverValueInCellA1, "Mmmm yyyy"). I always end up with #NAME? in A2.

    Is there an elegant solution?

  2. #2
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Format Month from String (2000)

    Hi,
    If your data is in A1 then the following formula will produce what you want:
    =TEXT(RIGHT(A1,2)&"/"&LEFT(A1,4),"mmmm yyyy")
    Hope that helps.
    Regards,
    Rory

    Microsoft MVP - Excel

  3. #3
    New Lounger
    Join Date
    Jul 2001
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Format Month from String (2000)

    Right on, Right on!

    That's perfect. Thank you, thank you, thank you.

    JMac

Posting Permissions

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