+ Reply to Thread
Results 1 to 7 of 7

Change text to date

  1. #1
    Forum Contributor
    Join Date
    12-02-2013
    Location
    england
    MS-Off Ver
    Excel 2007
    Posts
    112

    Change text to date

    HI,

    I have a text "Sunday 2 November 2014" in cell A19; and would like to change it to "2-Nov-2014" as a date, in cell B19.
    Is there any formulas available to correct the problem?

    Cheers

  2. #2
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,368

    Re: Change text to date

    =date(right(a19,4),month(datevalue(trim(mid(substitute(a19," ",rept(" ",60)),120,60))&"1")),trim(mid(substitute(a19," ",rept(" ",40)),40,40)))

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: Change text to date

    Or, slightly shorter...
    =--MID(A1,FIND(" ",A1,1)+1,99)
    format to the date you want
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Forum Contributor
    Join Date
    12-02-2013
    Location
    england
    MS-Off Ver
    Excel 2007
    Posts
    112

    Re: Change text to date

    Hi,
    FDibbins,

    That formula couldn't be formated despite several efforts.
    But, it is sorted now.

    Thanks for your co-operation.

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: Change text to date

    Perhaps your data doesnt quite match the sample you gave then?

    A
    B
    C
    1
    Sunday 2 November 2014
    41945
    02-Nov-14


    B1=--MID(A1,FIND(" ",A1,1)+1,99)
    C1= the same thing, formatted as dd-mmm-yy (or dd-mmm-yyyy if you want)

    If thats not working, then just out of curiosity, can you provide a sample workbook?

  6. #6
    Forum Contributor
    Join Date
    12-02-2013
    Location
    england
    MS-Off Ver
    Excel 2007
    Posts
    112

    Re: Change text to date

    Well, it did worked for another version of MS office.

    Cheers

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: Change text to date

    There is nothing in that formula that older versions of excel could not use, but as long as you got what you needed

+ 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. Change text date 22OCT2013 to actual date
    By grattis in forum Excel General
    Replies: 14
    Last Post: 12-19-2013, 08:32 AM
  2. Change date into text if <today and adding text if cell isblank... into an Array.
    By JasonNeedsHelp in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-29-2013, 12:06 PM
  3. Text to Date change
    By PhilipLynn in forum Excel General
    Replies: 3
    Last Post: 06-03-2008, 04:10 AM
  4. Change text to date and check against date in cell
    By RW in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-02-2006, 11:30 AM

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