+ Reply to Thread
Results 1 to 9 of 9

Concatenate columns and paste on in another worksheet column

  1. #1
    Forum Contributor
    Join Date
    06-12-2009
    Location
    Banglore
    MS-Off Ver
    Excel 2007
    Posts
    126

    Concatenate columns and paste on in another worksheet column

    Hi

    1. I am trying to Copy few columns from Source worksheet to Final worksheet
    2. Concatenate few columns of Source and paste in one column of Final Worksheet

    Here is the code I am trying somehow not working the concatenating part

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by santanuKD; 09-15-2019 at 03:35 PM.

  2. #2
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,408

    Re: Concatenate columns and paste on in another worksheet column

    Can you modify the example workbook you posted to show what the Fnal sheet is supposed to look like for the data on your Source sheet (maybe add a sheet and name it Desired)?

  3. #3
    Forum Contributor
    Join Date
    06-12-2009
    Location
    Banglore
    MS-Off Ver
    Excel 2007
    Posts
    126

    Re: Concatenate columns and paste on in another worksheet column

    Her is the revised file. Please refer the Final worksheet
    Attached Files Attached Files
    Shan

  4. #4
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,408

    Re: Concatenate columns and paste on in another worksheet column

    The following code will move the data you want moved, add the text and concatenate the column you want to a sheet named "Final" which is assumed to already exist. The code does no formatting. If you want formatting, let me know and I'll add code to make it look like, I'm guessing, your example "Final" sheet?
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    06-12-2009
    Location
    Banglore
    MS-Off Ver
    Excel 2007
    Posts
    126

    Re: Concatenate columns and paste on in another worksheet column

    Works like a charm. yes formatting will be helpful. Also if there is no Final sheet available it should check and create

    Quote Originally Posted by Rick Rothstein View Post
    The following code will move the data you want moved, add the text and concatenate the column you want to a sheet named "Final" which is assumed to already exist. The code does no formatting. If you want formatting, let me know and I'll add code to make it look like, I'm guessing, your example "Final" sheet?
    Please Login or Register  to view this content.

  6. #6
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,408

    Re: Concatenate columns and paste on in another worksheet column

    Quote Originally Posted by santanuKD View Post
    ...yes formatting will be helpful. Also if there is no Final sheet available it should check and create
    Replace the macro I gave you earlier with this expanded macro and see if it does what you want...
    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    06-12-2009
    Location
    Banglore
    MS-Off Ver
    Excel 2007
    Posts
    126

    Re: Concatenate columns and paste on in another worksheet column

    Thank you so much buddy.

    Here is the last bit to make it what I want

    1. Like you have combined data in "Final" D column with "Source" G column and returned in Final D column

    Similarly I need "Final" E column with "Source" H column and returned in "Final" E column

    2. I want the Column F for "Final" worksheet to return as "yes" if Final A Column is not blank

    3. I want the Column G for "Final" worksheet to return as "Medium" if Final A Column is not blank

    Quote Originally Posted by Rick Rothstein View Post
    Replace the macro I gave you earlier with this expanded macro and see if it does what you want...
    Please Login or Register  to view this content.

  8. #8
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,408

    Re: Concatenate columns and paste on in another worksheet column

    For future questions you ask in this (or any other) forum... please don't add "new" things piecemeal like you are doing with this question as it makes the programming much harder to do (most times it involves tearing existing code apart to fit the new stuff in). Just tell us all of your requirements so we can take them into account when we plan the code before writing it.

    Now, with that said, I am not 100% sure what you are asking for. Given that a "picture" is worth 1000 words, please post another workbook showing your Source sheet and the Final sheet you want constructed from it.

  9. #9
    Forum Contributor
    Join Date
    06-12-2009
    Location
    Banglore
    MS-Off Ver
    Excel 2007
    Posts
    126

    Re: Concatenate columns and paste on in another worksheet column

    Hi Rick,

    I agree with you.

    As we are almost done with this requesting to help.

    Added the file again and included comments in the Final File. I am sure a quick change for you.
    Attached Files Attached Files

+ 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. Copy Values from two columns and Paste them in one (Concatenate).
    By pipoliveira in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 07-08-2014, 11:12 AM
  2. Replies: 2
    Last Post: 01-13-2014, 10:52 AM
  3. Copy columns, remove duplicates and paste different worksheet and column query
    By Chris* in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-13-2014, 06:52 AM
  4. [SOLVED] Concatenate column B, C and D and paste result in new workbook
    By Pradeepg in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-09-2014, 01:40 AM
  5. Concatenate Columns from different worksheet
    By smugglersblues in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-23-2013, 08:37 PM
  6. Copy several columns and paste into specific column on another worksheet
    By lcy_84 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-31-2012, 09:19 AM
  7. Replies: 2
    Last Post: 08-16-2012, 01:41 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