+ Reply to Thread
Results 1 to 4 of 4

Trim/parse from right within cell - string lengths different

  1. #1
    Registered User
    Join Date
    03-26-2013
    Location
    Hartford, Connecticut
    MS-Off Ver
    Excel 2003
    Posts
    3

    Trim/parse from right within cell - string lengths different

    Frustrated! I have 1 column, 320 rows of email addresses, but when exported from contacts into the .csv format, they all came out as this (examples only):

    (row 1) [email][email protected]
    (row 2) [email][email protected]
    (row 3) [email][email protected]

    ...and so forth. Some have Auto-AddedEmail1, some have AutoAddedEmail1 (with or without the dash - ). Obviously, I want only the email address but I can't figure out how to parse the Auto-AddedEmail1 data. I'm uncertain how to trim (?) 15 OR 16 characters from the right, so I am left with only a valid email address. All I came up with is =trim(RIGHT(A1, [16]) I think I'm close, but not close enough!
    Last edited by oprpjm; 03-26-2013 at 01:32 PM.

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Trim/parse from right within cell - string lengths different

    Try

    =LEFT(A1,LEN(A1)-IF(ISNUMBER(FIND("Auto-Add",A1)),16,15))

  3. #3
    Registered User
    Join Date
    03-26-2013
    Location
    Hartford, Connecticut
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Trim/parse from right within cell - string lengths different

    Now I'm seeing some strings that are not uniform, in length or text the above string with a phone, address, etc. I want to share my workbook so I show the barriers I'm working with, but it does contain valid emails and bizarre data. I didn't check forum rules but am certain I really can't share that. The .csv to .xlsx messed up this file, and not sure how to get it back into it's original state. A mock example is:

    [email protected][/U][/B][/B][/B]352-654-2289WorkUncategorizedKennedyGilsonPropertiesMarketingDirector

    ..where all I want it the "[email protected]". I have a feeling that this is going to be a long manual process.

  4. #4
    Forum Contributor
    Join Date
    09-27-2012
    Location
    Florida
    MS-Off Ver
    Excel XP to 2013
    Posts
    342

    Re: Trim/parse from right within cell - string lengths different

    Try this It may work on many but not all of the cells.

    Please Login or Register  to view this content.
    Tom S.
    ↙ If you find my reply helpful click on the * down there on the left. Yeah that's it, right there, down on the left
    If your question is resolved, mark it SOLVED using the thread tools.

+ 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