+ Reply to Thread
Results 1 to 15 of 15

Dynamically consolidate multiple worksheets into one worksheet

  1. #1
    Registered User
    Join Date
    09-18-2012
    Location
    Arizona
    MS-Off Ver
    Excel 2010
    Posts
    27

    Dynamically consolidate multiple worksheets into one worksheet

    Hello everyone,
    I have about 50 tabs one for each city and i need to update information everyday for each of those cities. I now what the macro to update all the new entries in each of the worksheets into a consolidated Summary sheet. This is dynamic so if 10 rows are filled in the summary tab and if i update the rows in the individual city worksheets the summary tab should paste values from the 11th row and so on
    IS there a way to do it. I wold appreciate any help,
    Thank you

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Dynamically consolidate multiple worksheets into one worksheet

    Maybe:

    Please Login or Register  to view this content.
    If you want the clear Summary each time.

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    09-18-2012
    Location
    Arizona
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: Dynamically consolidate multiple worksheets into one worksheet

    How do I modify so that only rows from A6 are copied because i have headers in each of the worksheets. i have about 50 work sheets. By this code even the headers are getting copied.
    Also the macro says this line has an object defined error ws.UsedRange.Offset(1).Copy Sheets("Summary").Range("A6" & Rows.Count).End(3)(2)
    Thanks for your help
    Last edited by ramakrishnavbms; 03-06-2014 at 12:38 PM.

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Dynamically consolidate multiple worksheets into one worksheet

    Try:

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    09-18-2012
    Location
    Arizona
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: Dynamically consolidate multiple worksheets into one worksheet

    Copy method of range class failed is the message when i run the macro....

  6. #6
    Registered User
    Join Date
    09-18-2012
    Location
    Arizona
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: Dynamically consolidate multiple worksheets into one worksheet

    I have attached the file to make it easier. I have just put 3 cities for simplicity. But i have around 50 cities. Everyday when i add a row in each of the cities, i would need the data to be consolidated into the Summary sheet. So if i start today i should be able to see 30 days of consolidated data for all the cities after a month.
    Thank you for your help again
    Attached Files Attached Files

  7. #7
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Dynamically consolidate multiple worksheets into one worksheet

    Quote Originally Posted by ramakrishnavbms View Post
    How do I modify so that only rows from A6 are copied because i have headers in each of the worksheets. i have about 50 work sheets. By this code even the headers are getting copied.
    Also the macro says this line has an object defined error ws.UsedRange.Offset(1).Copy Sheets("Summary").Range("A6" & Rows.Count).End(3)(2)
    Thanks for your help
    There's no "A6" in the code I provided.

  8. #8
    Registered User
    Join Date
    09-18-2012
    Location
    Arizona
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: Dynamically consolidate multiple worksheets into one worksheet

    I tried to do that before you sent me the next code. I am using your original code, it still gives me that error

  9. #9
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Dynamically consolidate multiple worksheets into one worksheet

    Strange thing. I tried to run the code on the attachment you provided and I get a Run-Time-Error 32809. However, I created another workbook and copied your Sheets there while creating another Summary sheet. The code runs with no error. This one has me puzzled.

  10. #10
    Registered User
    Join Date
    09-18-2012
    Location
    Arizona
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: Dynamically consolidate multiple worksheets into one worksheet

    I have attached the file to make it easier. I have just put 3 cities for simplicity. But i have around 50 cities. Everyday when i add a row in each of the cities, i would need the data to be consolidated into the Summary sheet. So if i start today i should be able to see 30 days of consolidated data for all the cities after a month.
    Thank you for your help again.

    Is the code you provided same for this logic too ?

  11. #11
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Dynamically consolidate multiple worksheets into one worksheet

    No if you are entering data for each sheet then after you add your data you could use something like this.

    Please Login or Register  to view this content.
    However, this does not work on the workbook provided either. It still shows the same error?

  12. #12
    Registered User
    Join Date
    09-18-2012
    Location
    Arizona
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: Dynamically consolidate multiple worksheets into one worksheet

    I dont know why. The code is not working. I created a new workbook...The macro runs without giving an error but nothing comes up in the Summary Sheet. Its just blank....If i add another row of data in each of the sheets and run the macro again, it still doesnt populate anything. Im confused too

  13. #13
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Dynamically consolidate multiple worksheets into one worksheet

    Can you attach another file? This is a first for me and this error code. I'd like to try again on a different workbook.

  14. #14
    Registered User
    Join Date
    09-18-2012
    Location
    Arizona
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: Dynamically consolidate multiple worksheets into one worksheet

    Please find attached. For the last code which i ran , the summary sheets had duplicate entries from the individual worksheets. I would like only the additional rows that i add to populate in the summary sheet
    For ex: In the sheet attached there is data from 3 cities until row 11 in the summary sheet. Once i add more data in each of the 3 cities i want the new added data only to populate in the summary sheet from row12. None of the previous data should be pasted in the summary sheet.
    I appreciate your help on this..Please bear with me
    Thanks
    Attached Files Attached Files

  15. #15
    Registered User
    Join Date
    09-18-2012
    Location
    Arizona
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: Dynamically consolidate multiple worksheets into one worksheet

    Bumping the post..

    Thank you

+ 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. Macro to consolidate data from multiple data from worksheets into on worksheet
    By neilclelland in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-05-2013, 11:05 AM
  2. consolidate multiple worksheets
    By Mbutler132000 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-26-2010, 06:10 AM
  3. Consolidate Multiple Worksheets
    By DGA2008 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-09-2009, 09:03 AM
  4. Consolidate Multiple Worksheets Into One
    By DGA2008 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-29-2009, 05:49 PM
  5. Consolidate different worksheets into one worksheet
    By Hennie in forum Excel General
    Replies: 4
    Last Post: 07-28-2006, 07:40 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