+ Reply to Thread
Results 1 to 6 of 6

Concatenate a Column into one cell with a , between values

  1. #1
    Registered User
    Join Date
    10-10-2012
    Location
    Dallas
    MS-Off Ver
    Excel 2010
    Posts
    92

    Concatenate a Column into one cell with a , between values

    I have column F, populated with specific data:
    a071717 - Hailtrox, Ed
    a071717 - Hailtrox, Ed
    - GVZ_GDR XYZ Helpdesk – Security Data
    a473349 - Zvivt, Xiaotonk
    a464784 - Mxlaahan, Michael
    a058079 - Charles, Gerri


    I need to extract and concatenate Only the "A number" (ex: a058079) into one cell separated by a ,
    so i can copy and paste into a SQL query.

    currently the F column starts at F10 ends at F14470

  2. #2
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Concatenate a Column into one cell with a , between values

    This macro assumes that the data follows your example:

    Please Login or Register  to view this content.
    Gary's Student

  3. #3
    Registered User
    Join Date
    10-10-2012
    Location
    Dallas
    MS-Off Ver
    Excel 2010
    Posts
    92

    Re: Concatenate a Column into one cell with a , between values

    Thanks, but what are the steps to run / execute this macro ?
    I clicked Alt F11, the paste it into new module, then saved the file as Macro Enabled, then what ?


    Quote Originally Posted by Jakobshavn View Post
    This macro assumes that the data follows your example:

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    10-10-2012
    Location
    Dallas
    MS-Off Ver
    Excel 2010
    Posts
    92

    Re: Concatenate a Column into one cell with a , between values

    Actually, I think I got it. Now another problem, it did work well, and extracted all data perfectly. But for the Query, the string is more than 4000 characters !
    So how can i get to execute the macro in portions of that column ?


    Quote Originally Posted by Oceans View Post
    Thanks, but what are the steps to run / execute this macro ?
    I clicked Alt F11, the paste it into new module, then saved the file as Macro Enabled, then what ?

  5. #5
    Registered User
    Join Date
    10-10-2012
    Location
    Dallas
    MS-Off Ver
    Excel 2010
    Posts
    92

    Re: Concatenate a Column into one cell with a , between values

    You might think i am funny.

    But i think i got my second question as well.

    For i = 10 To 14470 <<<< here is where i can control the amount of data.....................Right?


    Quote Originally Posted by Oceans View Post
    Actually, I think I got it. Now another problem, it did work well, and extracted all data perfectly. But for the Query, the string is more than 4000 characters !
    So how can i get to execute the macro in portions of that column ?

  6. #6
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Concatenate a Column into one cell with a , between values

    Just change the 10 and the 14470

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 7
    Last Post: 12-07-2013, 02:33 PM
  2. How to Concatenate like values in a column
    By Joe Walsh in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-02-2013, 09:22 AM
  3. [SOLVED] Concatenate the values in a column one by one with multiple entries in another column
    By Pavan Renjal in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-11-2013, 08:13 AM
  4. Concatenate values in a column based on value of previous column
    By CountySurveyor in forum Excel General
    Replies: 3
    Last Post: 10-02-2012, 06:38 PM
  5. Compare cells in column 1 and concatenate values in column 2
    By sharmaremuk in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 07-20-2011, 09:04 PM

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