+ Reply to Thread
Results 1 to 6 of 6

Thread: split information in column to other columns

  1. #1
    Registered User
    Join Date
    07-14-2011
    Location
    Argentina
    MS-Off Ver
    Excel 2003
    Posts
    13

    split information in column to other columns

    Hello there, well im new to excel macros and i manage a lot of data so im tired of doing the same thing over an over.

    Ok so I attached a small example of what i have and ill try to explain

    column E
    Primera 496","Zona Centro, 22800 Mexicali, Baja California

    know i whant the info over the 2nd quote (,) to go to column F and the 3rd quote (,) data to go to column G

    and if posible another macro that can delete quotes , and the small space that separates it from the word, sorry im asking to much.

    forgive my language, and thanks.

    in the attached file in the first 2 rows thats what i whant it to look, the rest its what i have,
    the main problem is that the data changes country to country, state to state, city to city, etc. But the thing in common is the quotes.

    I tryed the macro record on excel to see what code it uses to separate them, but the only thing that does is write the words on the cells.
    Attached Files Attached Files
    Last edited by babar48; 07-14-2011 at 10:01 PM.

  2. #2
    Forum Guru Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    5,590

    Re: split information in column to other columns

    Try this

    Select Column E Then Text to Columns > Deliminated > Next > Delimiters check "comma" Text qualifier select {none} > Click Finish.

    Then select the result and use Find/Replace to remove Quotes " and apostrophes ' (or do this first if you would prefer to)

    e.g.
    Find what: "
    Replace with; (leave blank)
    Press "Replace All"

    Repeat with '

    Hope this helps.
    Last edited by Marcol; 07-14-2011 at 10:47 AM.
    If you need any more information, please feel free to ask.

    However, if this takes care of your needs, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED. It helps everybody! ....
    Also
    If you are satisfied by any members response to your problem please consider using the small Star icon botom left of thier post to show your appreciation.

  3. #3
    Registered User
    Join Date
    07-14-2011
    Location
    Argentina
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: split information in column to other columns

    it would be just what i need except that i dont need to slipt the first "comma" only 2nd and 3rd. but its almost what i whant :D

  4. #4
    Forum Guru Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    5,590

    Re: split information in column to other columns

    Okay Try this first.

    Select Column E
    then
    Find what: "," (quote comma quote)
    Replace with; "|" (quote pipe quote)
    Press Replace all

    Repeat with ',' (apostrophe comma apostrophe)

    Then Text to Columns as above

    Then with Column E
    Find what: "|" (quote pipe quote)
    Replace with; ", " (comma space)
    Press Replace all

    That should do it.

    Text to Columns is a useful tool when combined with Replace for splitting strings.
    Give it a try.
    If you need any more information, please feel free to ask.

    However, if this takes care of your needs, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED. It helps everybody! ....
    Also
    If you are satisfied by any members response to your problem please consider using the small Star icon botom left of thier post to show your appreciation.

  5. #5
    Registered User
    Join Date
    07-14-2011
    Location
    Argentina
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: split information in column to other columns

    yea thats great, u saved me a lot of time :D

    thanks a lot marcol.

  6. #6
    Forum Guru Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    5,590

    Re: split information in column to other columns

    Happy to help.
    If you need any more information, please feel free to ask.

    However, if this takes care of your needs, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED. It helps everybody! ....
    Also
    If you are satisfied by any members response to your problem please consider using the small Star icon botom left of thier post to show your appreciation.

+ 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.2.0