+ Reply to Thread
Results 1 to 4 of 4

Formula to convert string in a cell to a date

  1. #1
    Registered User
    Join Date
    06-12-2013
    Location
    Fairbury NE
    MS-Off Ver
    Excel 2007
    Posts
    70

    Formula to convert string in a cell to a date

    The text in my cell is numeric and indicates a month/tag#/year (i.e., 1-12345-13 is January-12345-2013 or 11-12345-12 is November-12345-2012).

    The formula I tried using (=REPLACE(A1,FIND("-",A1),7,"/"/")+0 is based on the length is always the same and since that is not the case, it is not working properly. Any suggestions on a correction?
    Last edited by maryren; 09-20-2013 at 12:11 PM.

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Formula to convert string in a cell to a date

    what do you mean by date what is the result
    do you mean 1-12345-13 should show as January-12345-2013 ? or do you want 1/1/2013
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    06-12-2013
    Location
    Fairbury NE
    MS-Off Ver
    Excel 2007
    Posts
    70

    Re: Formula to convert string in a cell to a date

    I would like the end result to be 1/1/2013

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Formula to convert string in a cell to a date

    =VALUE(LEFT(A1,FIND("-",A1)-1)&"/"&RIGHT(A1,2)+2000) format as mm/dd/yyyy

+ 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. Need Formula/VBA Code to convert date in String Format to Normal Date format
    By Karthik Sen in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-18-2012, 04:54 AM
  2. Convert string into a cell reference in a formula
    By seaottr in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-03-2011, 07:10 PM
  3. Convert DATE to string
    By Honeypum in forum Excel General
    Replies: 2
    Last Post: 03-12-2011, 04:07 PM
  4. Convert Date to STring
    By tonymaguire in forum Excel General
    Replies: 9
    Last Post: 02-15-2006, 07:35 AM
  5. How to convert string to a date
    By galsaba in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-04-2005, 02:06 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