+ Reply to Thread
Results 1 to 11 of 11

Splitting content in separate columns

  1. #1
    Registered User
    Join Date
    07-25-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    8

    Splitting content in separate columns

    Hi. I am trying to separate an address in to separate columns, which at the momemnt has been wrapped so using the Text to columns is not working.

    I have used this formula - =RIGHT(A1,LEN(A1)-FIND(CHAR(10),A1))
    which has worked so far in that is has separated each new part away from what went before but it still takes with it what follows it.

    For example.

    CELL A1 - Address 1, Address 2, City, Postcode
    CELL A2 - Address 2, City, Postcode
    CELL A3 - City, Postcode
    CELL A4 - Postcode

    How do I make it so that its:

    CELL A1 - Address 1
    CELL A2 - Address 2
    CELL A3 - City
    CELL A4 - Postcode

    I'm guessing that it is going to be a slight variation on the formula I have already used. If you have any ideas I would really appreciate your help.

    Thanks,

    Jen

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Splitting content in separate columns

    Hi Jen,

    Suggest you to share the sample workbook with dummy data covering all the possible scenario so that I can create a dynamic formula to suite every case


    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), dilipandey@gmail.com

  3. #3
    Registered User
    Join Date
    07-25-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Splitting content in separate columns

    Example Excel Doc.xlsxThanks. I've created a basic spreadsheet and included the formula that I mentioned above. I would like to have each o the entries in the full address to be in a separate column. I hope you'll be able to help.
    Thanks.

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,359

    Re: Splitting content in separate columns

    Hi jen2415

    Find the attached that does what I think you want.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  5. #5
    Registered User
    Join Date
    07-25-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Splitting content in separate columns

    Thank you but it doesn't seem to work when I transfer it to the real data. It ended up cutting off the beginning of the address... making what should have been 12 Redwood Road - ood Road.

    ---------- Post added at 09:14 AM ---------- Previous post was at 09:08 AM ----------

    It has worked perfectly for the other fields but Address 1 is being cut in half and missing the first part of it each time... the rest of the formulas are working though, I think it might be nearly there...

  6. #6
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,359

    Re: Splitting content in separate columns

    OK Jen,

    Try this one.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    07-25-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Splitting content in separate columns

    Amazing. Thank you so much. That has worked - you've just saved me hours of trawling through and separating each one by hand!

    ---------- Post added at 10:01 AM ---------- Previous post was at 09:19 AM ----------

    I'm still having a slightly problem with this. I am trying to transfer this through to Mail Merge in Word and although it is picking up the fields and the entries but each entry is being followed by _x000D_ how do I stop this from happening?

    Thanks in advance.

  8. #8
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,359

    Re: Splitting content in separate columns

    I guess that is something you have in the Word merge? I don't see any extra or funny characters in the Excel file. Check how you are merging first.

    Does the _x000D_ show in the Excel file? Perhaps this an End Of Line character that Word is tossing in?

  9. #9
    Registered User
    Join Date
    07-25-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Splitting content in separate columns

    No it doesn't show up in the excel document but it only shows up in Word in merge for the entries that are there as a result of the formula. For example it isn't appearing following the Mailing name which has just been inputted as normal text into the excel doc.

    I will have a look on ome mail merge forums and see if I can get an answer there...

  10. #10
    Registered User
    Join Date
    08-28-2012
    Location
    Kuala Lumpur
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Splitting content in separate columns

    Hello MarvinP,

    Unfortunately, my data is much more messier than Jen2412 and I really hope you can help me. I have cells that contain different/multiple lines and I had to split it for report purpose.

    Kindly see my attachment, cell-C9.. I would like to have "2nd Line of Column-A" to be blank if the original data consist of only 1 line.. Same result as in "3rd Line of Column-A" and "4th Line of Column-A".

    Hope you understand what I'm trying to explain.

    Rgds,
    CSMiin
    Attached Files Attached Files

  11. #11
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Splitting content in separate columns

    @csiim

    according to the forum rules you need to start and new topic.

    you can link this question in your text if you think it is usefull for your question.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

+ 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