+ Reply to Thread
Results 1 to 3 of 3

Trim date out of text string

  1. #1
    Registered User
    Join Date
    01-24-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    2

    Trim date out of text string

    I am trying to get just the date out of a text string.

    For example:

    11/01/2012/Acct#39078
    11/1/2012/Acct#39078

    I would like for it to return:
    11/01/2012
    11/1/2012

    Since the date length changes I am not able to use just the trim function.

    Any help would be appreciated for a first time poster!

    Thanks!

    Ron Howard

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Trim date out of text string

    hi Ron, welcome to the forum. is the text always starting with "Acct"? if so, try:
    =LEFT(A1,FIND("/Acct",A1)-1)+0

    if not, maybe:
    =LEFT(A1,FIND("^",SUBSTITUTE(A1,"/","^",3))-1)+0

    format cells as a date

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Registered User
    Join Date
    01-24-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Trim date out of text string

    Thanks! The second one worked!

    Ron

+ 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