+ Reply to Thread
Results 1 to 4 of 4

Transferring Rows of Multiple Data from one excel workbook to another

  1. #1
    Registered User
    Join Date
    12-04-2013
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2013
    Posts
    41

    Transferring Rows of Multiple Data from one excel workbook to another

    Hello,

    I am running into an interesting problem. I have two workbooks with similar columns (note: both workbooks may not have all the same columns, but for the same columns, the names are written identically in both workbooks.) I'll walk through what's in each sample workbook I've provided and what I am hoping to accomplish.

    Sample Workbook 1: This workbook contains multiple rows of data for one company (For example, Client "A Co" has 4 rows of data.)

    Sample Workbook 2: Contains some of the same columns as workbook 1, but not exactly in the same order.

    What I want to do is take all the multiple row data for a company in workbook 1 and put the information as a single row in workbook 2. So, Client "A Co" in Workbook 1 has 4 rows, but in Workbook 2 will have 1 row. It's matching columns, essentially. Columns that are present in both workbooks should have the data filled out in only ONE row in Workbook 2. As far as cost is concerned, Cost A in Workbook 2 is just the sum of all the Cost A's for a particular client in Workbook 2 and the same for Cost B.

    Notice, the column 'Products' in Workbook 1 is not in Workbook 2, and that's because each row for column may have different information and thus I would not be able to transfer it into a single row in workbook 2.

    I can copy and paste information manually, but I am working with a huge dataset, so I was wondering, can anyone help me create a Macro or write VBA code to perform this action?

    Thanks for your help.
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,575

    Re: Transferring Rows of Multiple Data from one excel workbook to another

    Assuming Sample 1 & 2 are in the same folder.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    12-04-2013
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2013
    Posts
    41

    Re: Transferring Rows of Multiple Data from one excel workbook to another

    I am actually getting the following error with the code:

    Capture.JPG

    Both workbooks are in the same folder.

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,575

    Re: Transferring Rows of Multiple Data from one excel workbook to another

    Working for me.
    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. [SOLVED] Check for Duplications when transferring data from One Workbook to Master Workbook
    By s2jrchoi in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-18-2014, 02:52 PM
  2. Transferring Data from Multiple Workbooks to a Master Workbook
    By Stopwatch in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-28-2013, 08:23 PM
  3. Replies: 4
    Last Post: 11-25-2013, 06:21 AM
  4. Transferring NEW data from one workbook to another
    By eatcress in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-09-2012, 04:09 PM
  5. Transferring Rows from one workbook to another
    By c.vaibhav in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-15-2009, 05:33 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