+ Reply to Thread
Results 1 to 2 of 2

Issue copying data from one workbook to another

  1. #1
    Forum Contributor
    Join Date
    04-11-2012
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    245

    Issue copying data from one workbook to another

    Hello,

    I have two workbooks, a Source workbook and a Destination workbook. I need to pull data from in the Source workbook and paste it into corresponding columns in the Destination workbook.

    When the column headers in both the Source workbook and the Destination workbook appear in row 1, the following macro works great.


    Please Login or Register  to view this content.

    However, the actual workbooks I'm working with contain extra rows and columns. For example, column headers in the Source workbook appear across row 2. Column headers in the Destination workbook appear across row 4. To complicate matters, the Destination workbook contains extra rows at the top, a blank row between the header labels and the first row of data, and extra blank columns across the worksheet. See attached Source2 and Dest2.

    I can't figure out how to modify my macro to account for these extra rows and columns.

    Thanks in advance for helping me solve this problem.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    09-18-2023
    Location
    Geogia, USA
    MS-Off Ver
    365
    Posts
    99

    Re: Issue copying data from one workbook to another

    Given the attached worksheets I would solve it this way:

    Please Login or Register  to view this content.
    If you know the source will always be formatted this way of course. If not, then a search of column names can be done. I'll upload one with does that.

    EDIT: this matches the column names from the source sheet to their match on the destination sheet

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by jdelano; 03-09-2024 at 11:57 AM.

+ 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. Copying all Sheets in one workbook issue
    By Philipluis30 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-17-2022, 01:18 PM
  2. Issue when copying filtered data from 2 workbooks
    By danielfr in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-27-2021, 12:44 PM
  3. VBA code Issue copying specific data to a set workbook
    By StephanieLilly in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-17-2015, 09:50 AM
  4. [SOLVED] Issue copying and pasting large data from separate workbooks into a new workbook
    By davo52 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-11-2014, 10:03 AM
  5. Issue with Macro Copying data from one worksheet to another
    By jcg894 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-11-2014, 05:03 PM
  6. Replies: 1
    Last Post: 04-01-2006, 03:50 PM
  7. [SOLVED] Issue Copying Data from one workbook to another
    By Mike G - D.C. in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-19-2005, 01:55 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