+ Reply to Thread
Results 1 to 9 of 9

I have two spreadsheets with data I need to combine parts of both sheet to a third workshe

  1. #1
    Registered User
    Join Date
    02-27-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    10

    I have two spreadsheets with data I need to combine parts of both sheet to a third workshe

    I have two spreadsheets with data I need to combine parts of both sheet to a third worksheet; I would like to use a macro if possible, the Sheet “Ship To” has 7 columns of data A2 to G2 87000 rows that needs to be filtered by column A and B and Sheet “FS Unit Table” column A and B to find matches if there is a match the results need to be copied the sheet “Ship to SN”

    So if the sheet “Ship To” Column A2 has data of 1 and B2 has data of 0 and has a matching 1 and 0 in columns A and B in Sheet “FS Unit Table” then from sheet “Ship To” columns A-G need to be copied to the sheet “Ship to SN” column A – G then the matching data from sheet “FS Unit Table” column C D Q Z need to be copied to sheet “Ship to SN” columns H I J K, there will only be one row of data from sheet “Ship To” and a number of rows in sheet “FS Unit Table” that match.

  2. #2
    Valued Forum Contributor
    Join Date
    02-09-2012
    Location
    Mauritius
    MS-Off Ver
    Excel 2007
    Posts
    1,055

    Re: I have two spreadsheets with data I need to combine parts of both sheet to a third wor

    Hi.

    Post a sample data file.
    Click *, if my suggestion helps you. Have a good day!!

  3. #3
    Registered User
    Join Date
    02-27-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: I have two spreadsheets with data I need to combine parts of both sheet to a third wor

    Hi,

    Here is a sample file
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor
    Join Date
    02-09-2012
    Location
    Mauritius
    MS-Off Ver
    Excel 2007
    Posts
    1,055

    Re: I have two spreadsheets with data I need to combine parts of both sheet to a third wor

    Check this out:

    Sample.xlsm

  5. #5
    Registered User
    Join Date
    02-27-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: I have two spreadsheets with data I need to combine parts of both sheet to a third wor

    Thanks for the code it works on the sample data, but when i run it on a copy of the live data it fills 9 rows and just sits there it has been running for about 2 hours. the live data has about 90000 rows on each sheet

  6. #6
    Registered User
    Join Date
    02-27-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: I have two spreadsheets with data I need to combine parts of both sheet to a third wor

    Quote Originally Posted by JACKNOT View Post
    Thanks for the code it works on the sample data, but when i run it on a copy of the live data it fills 9 rows and just sits there it has been running for about 2 hours. the live data has about 90000 rows on each sheet
    It just needed time to run the data I had was large and it took 4 hours to crunch,

    Thanks agian for the code and you expertise.

  7. #7
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: I have two spreadsheets with data I need to combine parts of both sheet to a third wor

    Give this a try, Might speed things up.

    Please Login or Register  to view this content.
    Last edited by mike7952; 02-28-2013 at 12:25 PM.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  8. #8
    Registered User
    Join Date
    02-27-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: I have two spreadsheets with data I need to combine parts of both sheet to a third wor

    Mike,

    Thanks for the code it worked a lot faster; I did have to change a line of the code

    aArrSN(n, 10) = aArr(i, 15) column o
    to
    aArrSN(n, 10) = aArr(i, 17) column q

    Other than that it worked great,

    Thanks again
    Jack

  9. #9
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: I have two spreadsheets with data I need to combine parts of both sheet to a third wor

    Ah ok. Glad its working!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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