+ Reply to Thread
Results 1 to 6 of 6

find columns with same headers in multiple worksheet and coping column in new sheet

  1. #1
    Registered User
    Join Date
    08-17-2012
    Location
    Serbia
    MS-Off Ver
    Excel 2003
    Posts
    24

    find columns with same headers in multiple worksheet and coping column in new sheet

    i have workbook, where i need a macro that he finds columns with same headers, and he copies data new sheet. colomns in different order in sheets. this is my code, he works with the sheets that that have same order of columns

    Please Login or Register  to view this content.
    my macro is in private workbook
    Attached Files Attached Files
    Last edited by gogi100; 05-16-2022 at 03:11 PM.

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,740

    Re: find columns with same headers in multiple worksheet and coping column in new sheet

    Please post a sample workbook: instruction in yellow banner at top of page.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  3. #3
    Registered User
    Join Date
    08-17-2012
    Location
    Serbia
    MS-Off Ver
    Excel 2003
    Posts
    24

    Re: find columns with same headers in multiple worksheet and coping column in new sheet

    i attached my workbook

  4. #4
    Registered User
    Join Date
    08-17-2012
    Location
    Serbia
    MS-Off Ver
    Excel 2003
    Posts
    24

    Re: find columns with same headers in multiple worksheet and coping column in new sheet

    i found solution with next code
    Please Login or Register  to view this content.
    but i have one more problem. when i type range A1 i receive error run-time error 13, typemismatch. and when i click on debug i go to line

    Arr = Application.Transpose(Application.Transpose(Master.Range(Master.Cells(1, 1), Master.Cells(1, LC1)).Value))

    What i do?

  5. #5
    Registered User
    Join Date
    08-17-2012
    Location
    Serbia
    MS-Off Ver
    Excel 2003
    Posts
    24

    Re: find columns with same headers in multiple worksheet and coping column in new sheet

    i modified my code and this code works with range A1

    Please Login or Register  to view this content.
    but i have one more problem. if my column have blank cell. the copying does not works. my current situation is
    sheet 1, sheet 2 and allsheets. i want situation like on allsheets-1
    Last edited by gogi100; 05-17-2022 at 02:00 PM.

  6. #6
    Registered User
    Join Date
    08-17-2012
    Location
    Serbia
    MS-Off Ver
    Excel 2003
    Posts
    24

    Re: find columns with same headers in multiple worksheet and coping column in new sheet

    i cannot upload pictures that i show what i want. can you help me. your button does not works
    Last edited by gogi100; 05-17-2022 at 02:15 PM. Reason: edit

+ 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. [SOLVED] Find and Replace Multiple Columns in Sheet 1 Based on a Column Values in Sheet 2
    By adblog3 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-07-2020, 01:49 PM
  2. [SOLVED] Extract multiple row headers and column headers if criteria is met in multiple columns
    By PaulM100 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 09-20-2019, 04:56 AM
  3. [SOLVED] Add column headers to newly created worksheet and add formatting to all columns
    By moosetales in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 01-18-2016, 07:21 AM
  4. Copy/Paste Columns from Multiple Worksheets based on Headers into new Worksheet
    By casper3043 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-01-2015, 03:06 PM
  5. Replies: 2
    Last Post: 06-14-2013, 10:01 AM
  6. Search for value in multiple columns, Return Column Headers
    By Zach51215 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-30-2013, 06:49 AM
  7. Help with Converting Multiple Rows to Columns and add Column Headers
    By Lmsloman in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-27-2010, 10:45 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