+ Reply to Thread
Results 1 to 14 of 14

Merging multiple sections of data to one table

  1. #1
    Registered User
    Join Date
    08-09-2013
    Location
    NY
    MS-Off Ver
    Excel 2010
    Posts
    39

    Merging multiple sections of data to one table

    Hi all,

    I took this task to help someone thinking it would be 1,2,3. I thought this could be done with VLOOKUP, but it's not working the way it needs to. If it can be done without VBA be sure to let me know, but since I couldnt get it to work im under the impression that it cant.

    There are multiple worksheets (6 i think), all with a certain section of data(list of names/titles/etc) that needs to be merged to a master list. Like so:

    Please Login or Register  to view this content.
    The master list needs to update as users add/delete data to the other sheets, and each sheet won't always have the same number of rows. Any ideas?

  2. #2
    Registered User
    Join Date
    08-09-2013
    Location
    NY
    MS-Off Ver
    Excel 2010
    Posts
    39

    Re: Merging multiple sections of data to one table

    I guess this confirms it was more complicated than I thought, haha.

  3. #3
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Merging multiple sections of data to one table

    Hi Marandopsu

    If you were to post your File perhaps one of us could figure it out.

    Please attach a sample file that represents what you have. The structure of your attachment should be the same structure as your actual data. Any proprietary information should be changed.

    Include in the attachment any code you're currently using (whether it works or not) and an "After" worksheet that demonstrates what you wish the output to be.

    To Attach a File:

    1. Click on Go Advanced
    2. In the frame Attach Files you will see the button Manage Attachments
    3. Click the button.
    4. A new window will open titled Manage Attachments - Excel Forum.
    5. Click the "Add Files"... button to locate your file for uploading.
    6. This will open a new window File Upload...Click "Select Files"
    7. Once you have located the file to upload click the Open button. This window will close.
    8. You are now back in the Manage Attachments - Excel Forum window.
    9. Click the "Upload Files" button and wait until the file has uploaded.
    10. Click the "Done" Button.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  4. #4
    Registered User
    Join Date
    08-09-2013
    Location
    NY
    MS-Off Ver
    Excel 2010
    Posts
    39

    Re: Merging multiple sections of data to one table

    Thanks jaslake! There's a lot of personal information in this sheet so I mocked up something per your request. The merged worksheet shows the desired result (would usually be blank).

    There is no other code to contend with. Thanks again.
    Attached Files Attached Files

  5. #5
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Merging multiple sections of data to one table

    Hi Marandopsu

    Are the Structures of your Worksheets fixed as in your Sample File...eg: does "Employee Name" ALWAYS appear in Cells B4 and B23 in EVERY Worksheet?

  6. #6
    Registered User
    Join Date
    08-09-2013
    Location
    NY
    MS-Off Ver
    Excel 2010
    Posts
    39

    Re: Merging multiple sections of data to one table

    Thanks for the reply.

    Yes, the structure is fixed. Each sheet will not always be filled all the way to B22, but the structure is always B4 through B22 for the first Employee Name and B23 through whatever for the second.
    Last edited by Marandopsu; 11-06-2013 at 01:49 AM.

  7. #7
    Registered User
    Join Date
    08-09-2013
    Location
    NY
    MS-Off Ver
    Excel 2010
    Posts
    39

    Re: Merging multiple sections of data to one table

    Did some searching/tweaking. This is as close as I was able to get tonight:

    Please Login or Register  to view this content.
    That seems to grab what I want, but I can't get it to put it in the right place. It also will paste repeatedly vertically if you run it more than once, when it really should just paste the same info to the same spots over and over if you spam it. I tried changing the following to get it to paste to the correct spot:

    Please Login or Register  to view this content.
    But that only pastes Worksheet 6 (I assume because it is last)? Im probably just shooting in the dark here, not even sure if I am on the right track. Obviously new to this.

  8. #8
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Merging multiple sections of data to one table

    Hi Marandopsu

    Try this Code in the attached
    Please Login or Register  to view this content.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    08-09-2013
    Location
    NY
    MS-Off Ver
    Excel 2010
    Posts
    39

    Re: Merging multiple sections of data to one table

    Looks perfect at first glance. I'll let you know if there are any issues when I get a chance to implement it live. Thanks!

    Can't believe it was so complicated, I was half expecting someone to roll up and do it with a pivottable or something within minutes

  10. #10
    Registered User
    Join Date
    08-09-2013
    Location
    NY
    MS-Off Ver
    Excel 2010
    Posts
    39

    Re: Merging multiple sections of data to one table

    [edit] nevermind, see below
    Last edited by Marandopsu; 11-06-2013 at 08:57 PM.

  11. #11
    Registered User
    Join Date
    08-09-2013
    Location
    NY
    MS-Off Ver
    Excel 2010
    Posts
    39

    Re: Merging multiple sections of data to one table

    Nevermind the above post, I just remade their spreadsheet around your code. Easy enough, and I may as well do some work rather than putting it all on you ;p

    I ended up having to edit some of your code. There is some stuff underneath the bottom table in my live spreadsheet, so the second section of data was being pasted underneath THAT rather than in the correct location. Therefore I redefined LR as Range and mimic'd the code you used for rlast.

    Please Login or Register  to view this content.
    (you used this)

    Please Login or Register  to view this content.
    Is my method OK? It works fine now but I dont know if this will cause any unforeseen problems later. I assume there is a reason you did it the way you did. Thanks again man!

  12. #12
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Merging multiple sections of data to one table

    Hi Marandopsu

    The Code I provided was based on your Sample File and was made to WORK on the Sample File. If the Structure of your Actual File is different it'll impact the Code.

    There is some stuff underneath the bottom table in my live spreadsheet
    Try your mod's...if they work, fine...if not, get back to me with a copy of the Actual File Structure.

    Good hunting...

  13. #13
    Registered User
    Join Date
    08-09-2013
    Location
    NY
    MS-Off Ver
    Excel 2010
    Posts
    39

    Re: Merging multiple sections of data to one table

    No sweat, it works perfect. Just wanted to pick your brain about the original method you used to help my learning process Wasn't sure if you had a reason for doing it two different ways for each table.

    Thanks again, you're the man. I really appreciate the help. Cheers~

  14. #14
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Merging multiple sections of data to one table

    Hi Marandopsu

    Yes, there was a reason for doing it two different ways for the two tables. Again, it was based on the Sample File...it's what worked...for the Sample File.

    Had the Sample File been of the same Structure as your Actual File the approach probably would have been different...don't know as I don't have your Actual File.

+ 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] Macro to sort variable rows of data by a column in multiple sections
    By mannuhs in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-11-2013, 03:22 PM
  2. [SOLVED] Removing Sections of Data From Multiple Cells
    By AndianAtWork in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-14-2012, 08:38 PM
  3. [SOLVED] Summarizing data from multiple sections
    By tuppari in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-22-2012, 07:04 AM
  4. Sorting Data w/in Multiple sections
    By jeff.nglc in forum Excel General
    Replies: 1
    Last Post: 08-06-2008, 04:29 PM
  5. Merging Pivot Table Data
    By kenny@kenny.com in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-21-2005, 08:05 AM

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