Closed Thread
Results 1 to 5 of 5

Copy specific columns from all the files in the folder and combine those columns in sheet

  1. #1
    Registered User
    Join Date
    11-14-2022
    Location
    chennai
    MS-Off Ver
    2016
    Posts
    30

    Copy specific columns from all the files in the folder and combine those columns in sheet

    Dear Gurus,
    I got the below code that it combine sheets from all the files in the folder copy to another workbook, the code works well. But i want to copy specific columns from all the files, I tried but i cannot able to get. Can you help me here please.
    I think there is no need for attachment. Can you asssume that there are 25+ files in a folder other folder path and result should come in the sheet1 in active workbook. If you still want sample files then i can share. thanks.
    Please Login or Register  to view this content.
    Last edited by JaffarAhamed; 09-10-2023 at 01:31 PM. Reason: added lines

  2. #2
    Registered User
    Join Date
    11-14-2022
    Location
    chennai
    MS-Off Ver
    2016
    Posts
    30

    Re: Copy specific columns from all the files in the folder and combine those columns in sh

    Below is the column header should consider from all the files in the folder

    Please Login or Register  to view this content.
    otherwise the code could be the list where i can add column headers in other sheet

  3. #3
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow Re: Copy specific columns from all the files in the folder and combine those columns in sh


    Hello,

    as I can't stand how it is possible your code 'works well' so I can't give it a try without the necessary workbooks (code & source data) …

  4. #4
    Forum Contributor
    Join Date
    07-24-2023
    Location
    Como, Italy
    MS-Off Ver
    MSO 365 - Ver 2208
    Posts
    120

    Re: Copy specific columns from all the files in the folder and combine those columns in sh

    Hello JaffarAhamed,

    your code reported in post #1 only takes care of:
    • searching the files;
    • opening them;
    • importing all the columns from A to AA by pasting only the value of the cells.

    Next I detect the presence of "CopyColumnsByName" whose purpose escapes me.

    If your intention is to extract only some columns (as in post 2), you should create a sheet where you will insert the desired columns and copy, after searching the open files, only the values of those.

    Bye
    Last edited by maxpit; 09-10-2023 at 03:32 PM.
    Max
    let's compare ideas

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,725

    Re: Copy specific columns from all the files in the folder and combine those columns in sh

    Administrative Note:

    Welcome to the forum.

    Unfortunately, this is a duplicate thread, and you are allowed only ONE thread per issue here.

    Please see Forum Rule #2 about thread duplication.

    I am closing this thread, but you may continue here in the original thread

    Thread closed.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

Closed Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Copy specific columns from multiple files in folder and combine those columns in workbook
    By JaffarAhamed in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 09-13-2023, 04:11 AM
  2. [SOLVED] Copy specific columns from all excel files saved in selected folder
    By KKR1975 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 09-03-2020, 11:03 PM
  3. [SOLVED] vba to copy specific sheet tab from several files folder to consolidation workbook
    By JEAN1972 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-15-2018, 06:16 AM
  4. [SOLVED] Copy specific columns in sheet A and paste in specific columns in sheet B
    By Vassen in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-09-2017, 05:27 AM
  5. [SOLVED] VBA to Copy the same Columns from multiple files in one folder
    By mcanant in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-16-2014, 03:15 AM
  6. Replies: 8
    Last Post: 04-04-2013, 08:02 PM
  7. Opening all .csv files in a folder and deleting specific columns
    By jamesmac91 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-30-2012, 11:20 AM

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.6.0 RC 1