+ Reply to Thread
Results 1 to 9 of 9

Recognizing text format as date

Hybrid View

  1. #1
    Registered User
    Join Date
    08-17-2012
    Location
    Atlanta
    MS-Off Ver
    Excel 2003
    Posts
    34

    Recognizing text format as date

    Hello,

    How can a cell which contains text that appear like:

    July, 2012

    October, 2011

    be recognized as date?

    thanks

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Recognizing text format as date

    The below suggestion will work if your system Date setting is DD/MM/YYYY

    Assume that the data in A1 cell

    A1 cell
    July, 2012

    In B1 cell
    Formula: copy to clipboard
    =VALUE((1&A1))

    Or
    Formula: copy to clipboard
    =--(1&A1)


    Will convert it as real date. Format the cell as date.

    Hope this helps!
    Last edited by :) Sixthsense :); 11-03-2012 at 01:42 AM. Reason: Condition Added


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Valued Forum Contributor
    Join Date
    08-14-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    573

    Re: Recognizing text format as date

    @Sixthsense: Both the formula returns #value error. Have i missed anything?

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Recognizing text format as date

    Quote Originally Posted by Sindhus View Post
    @Sixthsense: Both the formula returns #value error. Have i missed anything?
    Yes, you copied the OP's Text with line break and applied my suggestion.

    But the actual text should be
    Formula: copy to clipboard
    July, 2012


    Now try the formula which i suggested.

    I believe that OP's data don't have line break inside the cell. In that case the formula which i suggested will work fine.
    Last edited by :) Sixthsense :); 11-03-2012 at 01:00 AM. Reason: Correction in sentence

  5. #5
    Valued Forum Contributor
    Join Date
    08-14-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    573

    Re: Recognizing text format as date

    No i didnt copy it. I typed it myself.

    Now i copied your text and tried. Still returning error only

  6. #6
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Recognizing text format as date

    Quote Originally Posted by Sindhus View Post
    No i didnt copy it. I typed it myself.

    Now i copied your text and tried. Still returning error only
    The problem is that the date setting of your system is MM/DD/YYYY, but my date setting is DD/MM/YYY.

    In OP’s data "July, 2012" already the Month July is present so adding 1 (=--(1&A1)) with the "July, 2012" is like saying JanuaryJuly,2012 and converting it to real number with the text data is getting #VALUE! Error.

    But in my case, (i.e.) my system date setting is DD/MM/YYY so adding 1 (=--(1&A1)) with the "July, 2012" is like saying 1July,2012 and converting it to real number with the text data is getting 1-Jul-12.

    If you want to test it, then Control Panel>>Date&Time Setting>>Regional & Language Option>>Regional Option>>Customize>>Date>>Short Date Format (Date Setting) & Long Date Format (Date Setting).

  7. #7
    Valued Forum Contributor
    Join Date
    08-14-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    573

    Re: Recognizing text format as date

    I dont think excel can recognize your format as date. You can use some formula like this to convert it to date.
    Formula: copy to clipboard
    =DATE(RIGHT(D7,4),MONTH(1&LEFT(D7,FIND(",",D7,1)-1)),1)
    Change D7 to your cell reference.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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