+ Reply to Thread
Results 1 to 8 of 8

Extracting date

  1. #1
    Forum Contributor
    Join Date
    10-30-2007
    Posts
    125

    Extracting date

    In cell B2 is Date: 7/17/08 - 7/17/08 and I want to extract 7/17/08 into cell
    E3. Could someone assist?


    Thank you.
    ExcelNewby

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Try

    =left(A1,find("-",A1)-2)+0

    format cell as date...
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Contributor
    Join Date
    10-30-2007
    Posts
    125
    I'm getting #VALUE! as a return and I don't know why???

    Thank you.
    ExcelNewby

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Did you change the A1's to B2's to suit your cell reference?

    =left(B2,find("-",B2)-2)+0

  5. #5
    Forum Contributor
    Join Date
    10-30-2007
    Posts
    125
    Yes, I did replace A1 with B2 and formatted cell E3 as Date. Do you think the word Date in B2 has anything to do with it?


    ExcelNewby

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Sorry, I didn't catch that "Date:" is also in the cell string...

    try:

    =MID(A1,FIND("Date: ",A1)+6,FIND("-",A1)-FIND("Date:",A1)-7)+0

  7. #7
    Forum Contributor
    Join Date
    10-30-2007
    Posts
    125
    Yeah!!! You did it. Thank you for making my weekend. If you were living any closer you would have get free babysitting service..maybe when you visit Atlanta.

    Thanks again.

  8. #8
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    If both dates in the string are always the same, then this simpler formula should do it too!

    =MID(A1,FIND("-",B2)+2,255)+0

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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