+ Reply to Thread
Results 1 to 11 of 11

Separate data in a cell

Hybrid View

  1. #1
    Registered User
    Join Date
    07-26-2011
    Location
    Mexico
    MS-Off Ver
    Excel 2007
    Posts
    11

    Separate data in a cell

    "300 Flauger Hill Road - Aberdeen, OH 45101
    "
    This is my cell, I need to separate:

    Street
    City
    State
    Zip

    into separate columns so I can import it into CRM
    I can use the character right left to pull the zip and state because they have the same amount of characters, but it won't work for City and street.

    Please help!
    Last edited by Neilsen69; 09-02-2011 at 01:34 PM.

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

    Re: Stuck on separating data in a cell

    If all entries are consistent, then assuming first entry is in A1, try these:

    In B1:

    =LEFT(A1,FIND("-",A1)-1)

    In C1:

    =TRIM(MID(A1,FIND("-",A1)+1,FIND(",",A1)-FIND("-",A1)-1))

    in D1:

    =LEFT(RIGHT(A1,8),2)

    in E1:

    =RIGHT(A1,5)

    each copied down
    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
    Registered User
    Join Date
    07-26-2011
    Location
    Mexico
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Stuck on separating data in a cell

    Quote Originally Posted by NBVC View Post
    If all entries are consistent, then assuming first entry is in A1, try these:

    In B1:

    =LEFT(A1,FIND("-",A1)-1)

    In C1:

    =TRIM(MID(A1,FIND("-",A1)+1,FIND(",",A1)-FIND("-",A1)-1))

    in D1:

    =LEFT(RIGHT(A1,8),2)

    in E1:

    =RIGHT(A1,5)

    each copied down
    First, thank you for helping me with this. Okay B1 & C1 worked great, D1 and E1 did not work, possibly there maybe space characters in between. How can I check that. Weird I thought those would be the easier of the two. I can always just make a OH column. But I do need to grab those Zip codes.

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

    Re: Stuck on separating data in a cell

    How about:

    =LEFT(RIGHT(TRIM(A1),8),2)

    and

    =RIGHT(TRIM(A1),5)

  5. #5
    Registered User
    Join Date
    07-26-2011
    Location
    Mexico
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Stuck on separating data in a cell

    Quote Originally Posted by NBVC View Post
    How about:

    =LEFT(RIGHT(TRIM(A1),8),2)

    and

    =RIGHT(TRIM(A1),5)
    D1 pulled just the letter H and E1 pulls nothing, just empty. I appreciate your help, this is beyond my skill set, but I hope to reverse engineer your formula to learn it

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

    Re: Stuck on separating data in a cell

    How about?

    =LEFT(TRIM(MID(A1,FIND(",",A1)+1,100)),2)

    and

    =RIGHT(TRIM(A1),5)

  7. #7
    Registered User
    Join Date
    07-26-2011
    Location
    Mexico
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Stuck on separating data in a cell

    Quote Originally Posted by NBVC View Post
    How about?

    =LEFT(TRIM(MID(A1,FIND(",",A1)+1,100)),2)

    and

    =RIGHT(TRIM(A1),5)
    D1 is good

    E1 still nothing but D1 is solved

    I am so sorry about this

  8. #8
    Registered User
    Join Date
    07-26-2011
    Location
    Mexico
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Stuck on separating data in a cell

    Okay I gave you the master so you can see what I am starting with, and a workbook to show your formulas. E1 worked on just row 1. Again thank you, does this site have any excel training courses so I can get better at this?
    Attached Files Attached Files

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

    Re: Separate data in a cell

    So the last 5 characters in the original are not the zip code digits? Even after trimming?

    Can you show sample where it didn't work?

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

    Re: Separate data in a cell

    You have a special non-printable carriage return character at the end...

    try:
    =RIGHT(CLEAN(A1),5)

  11. #11
    Registered User
    Join Date
    07-26-2011
    Location
    Mexico
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Separate data in a cell

    Quote Originally Posted by NBVC View Post
    How about?

    =LEFT(TRIM(MID(A1,FIND(",",A1)+1,100)),2)

    and

    =RIGHT(TRIM(A1),5)
    Quote Originally Posted by NBVC View Post
    You have a special non-printable carriage return character at the end...

    try:
    =RIGHT(CLEAN(A1),5)

    You're awesome thanks, don't know how you know this stuff, I am truly envious. Thank You will mark solved.

+ 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