Compile 2 Lists On 2 Pages Into 1

  • Here's some code that I got from an old thread.


    I'd like to do something similar, yet different. I have 4 columns on 2 pages that I'd like to combine this time around. I'd like to end up with this as my result.


    Sheet1ColumnA Sheet1ColumnB Sheet1ColumnC Sheet1ColumnD
    Sheet2ColumnA Sheet2ColumnB Sheet2ColumnC Sheet2ColumnD


    Thanks in advance.

    Ed
    [SIZE=6]*ficus*[/SIZE]
    Thanks to all for making this website work!

  • Re: Compile 2 Lists On 2 Pages Into 1


    If I red it correctly, it sounds like you just need to insert a column before column A on each sheet. (delete the new column E -- old column D) if you have data to the right that needs to stay in the same columns.

  • Re: Compile 2 Lists On 2 Pages Into 1


    Well the code above takes 3 colums from one worksheet and makes them one column on the same sheet. What I need should be more clear from the example below.


    Sheet 1
    A1 B1 C1 D1
    A2 B2 C2 D2
    A3 B3 C3 D3


    Sheet 2
    A1 B1 C1 D1
    A2 B2 C2 D2
    A3 B3 C3 D3


    Now those two will be compiled into one
    Sheet 3
    A1 B1 C1 D1
    A2 B2 C2 D2
    A3 B3 C3 D3
    A1 B1 C1 D1
    A2 B2 C2 D2
    A3 B3 C3 D3


    Does that make sense?

    Ed
    [SIZE=6]*ficus*[/SIZE]
    Thanks to all for making this website work!

  • Re: Compile 2 Lists On 2 Pages Into 1


    Anyone have any idea if this is even possible? It's gotta be, right?

    Ed
    [SIZE=6]*ficus*[/SIZE]
    Thanks to all for making this website work!

  • Re: Compile 2 Lists On 2 Pages Into 1


    Maybe this?


  • Re: Compile 2 Lists On 2 Pages Into 1


    Arthur


    You generally don't need to select.


    Code
    Dim sh1 As Worksheet
        Dim sh2 As Worksheet
        Dim sh3 As Worksheet
        
        Set sh1 = Sheets(1)
        Set sh2 = Sheets(2)
        Set sh3 = Sheets(3)
        
        Range(sh1.Cells(1), sh1.Cells(ColA1Len, 2)).Copy sh3.Cells(1)
        Range(sh2.Cells(1), sh2.Cells(ColA2Len, 2)).Copy sh3.Range(sh3.Cells(ColA1Len + 1, 1), sh3.Cells(ColA1Len + ColA2Len, 2))


    untested code


    Wigi

    Regards,


    Wigi


    Excel MVP 2011-2014


    For more Excel memes: visit http://www.wimgielis.com ==> English articles ==> Excel memes


    -- Topics without [CODE] tags or a meaningful topic title, will be neglected by me (and probably many others as well) --

  • Re: Compile 2 Lists On 2 Pages Into 1


    try

  • Re: Compile 2 Lists On 2 Pages Into 1


    Thanks guys, works great.

    Ed
    [SIZE=6]*ficus*[/SIZE]
    Thanks to all for making this website work!

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!