+ Reply to Thread
Results 1 to 6 of 6

Convert Date " yyyymm" through Formatting

  1. #1
    Forum Contributor
    Join Date
    01-03-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    211

    Convert Date " yyyymm" through Formatting

    Hi All

    I have a report that shows date in this format " yyyymm"

    Is there a way of converting it through the formatting feature into "mm" ?

    I know about formulae =DATE(LEFT(A4,4),MID(A4,5,2), RIGHT(A4,2)) but I rather avoid adding another column..

    Thank you

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Convert Date " yyyymm" through Formatting

    Hi,

    As always with these things we really need to see a complete example in the workbook itself. Particularly since dates are concerned.

    It's not clear whether your 'date' is a proper date number or just a text string. i.e what's actually in the cell not what does it look like. Is it a number, say 41740, or text 11042014. Use =ISNUMBER(A1) to test it.

    If it's a number then format it as "mm". If it's just text then you will need some function to extract the month bit of it. However upload the workbook for a more definitive response.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,791

    Re: Convert Date " yyyymm" through Formatting

    Is it just year and month (no day), and with a space at the front ? If so, it will be difficult to transform it using just formatting. You could use a formula in an adjacent column to convert it to proper date format, then fix the values, then delete the original column.

    Hope this helps.

    Pete

  4. #4
    Forum Contributor
    Join Date
    01-03-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    211

    Re: Convert Date " yyyymm" through Formatting

    here is the file..
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    01-03-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    211

    Re: Convert Date " yyyymm" through Formatting

    no Space..Thanks

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,791

    Re: Convert Date " yyyymm" through Formatting

    Insert a new row 1 above your table. Copy row 2 into row 1 so that you have the same formatting. Put this formula in A1:

    =DATE(LEFT(A2,4),RIGHT(A2,2),1)

    Apply a custom format to that cell of "mmm". Then copy A1 into B1:G1 (note, you have two January columns in this sample). Then select the cells A1:G1, click <copy>, then right-click | Paste Special | Values | OK then press the <Esc> key. Then you can delete row 2.

    Hope this helps.

    Pete

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 6
    Last Post: 02-16-2014, 07:15 PM
  2. [SOLVED] Excel 2007: How to Convert "5/2/2013" to "May" then subtract a Month so it's "Apr"
    By Golom in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-19-2013, 02:00 AM
  3. Return "green", "yellow" or "red" from date/age and priority ranking
    By Cantaloop in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-04-2013, 12:12 AM
  4. Replies: 8
    Last Post: 12-31-2012, 05:19 PM
  5. Conditional Formatting - Replace date with "YES" or "NO"
    By christinie in forum Excel General
    Replies: 3
    Last Post: 11-01-2012, 04:10 PM

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