+ Reply to Thread
Results 1 to 5 of 5

Long list aggregating sheets in same book

  1. #1
    Registered User
    Join Date
    10-22-2010
    Location
    London, England!
    MS-Off Ver
    Excel 2010
    Posts
    4

    Long list aggregating sheets in same book

    Hi . Good site!

    What I need help with is as follows:

    I want to create a long list summary sheet aggregating the rows of data from 5 other sheets in the same book.

    Formatting, column headings etc are consistent across the sheets, but the number of rows of data on each sheet is changing regularly

    In my imagination this is a function which might be simple with some programming knowledge. I am afraid I am an excel user (relatively new to this 2010 version) with no experience of macros & programming to speak of.

    Can I readily build this aggregated list function?

    Thanks for whatever help you can offer

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Long list aggregating sheets in same book

    'MANY SHEETS TO ONE SHEET
    I have a macro that may be "almost ready to use" for merging data from multiple sheets into a "consolidation" sheet.
    The macro merges to a sheet called Consolidate, change that in your sheet or in the code.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    10-22-2010
    Location
    London, England!
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Long list aggregating sheets in same book

    Thanks Jerry! I find it extraordinary and delightful both that:

    1) you have so quickly and readily solved what was to me a tricky problem

    2) the code you gave me worked the first time I tried it - no errors, no failures or fiddles or anything... brilliant!

    As for the double posting, I do apologise. It was not a tactic so much as an uncertainty and indecision on which was the right place to ask. With hindsight I sense that either would have done, but "both" was the ONLY wrong answer!

    oh well - we live and learn - I hope I qualify for first post leniency...

  4. #4
    Registered User
    Join Date
    10-22-2010
    Location
    London, England!
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Long list aggregating sheets in same book

    I do have one follow up query:

    having used the macro code, I now have a nicely generating aggregation of my sheets.

    The "consolidate" sheet, however, will not retain all cell formats column widths for me - whenever refreshed the whole width of the sheet is the minimum to accommodate the longest single row all on one line - which is too long in this instance - and loses dates and so on


    I shall go on searching, but in case I am missing an obvious trick here, can you tell me how to retain all formatting & layout on my "consolidate" sheet

    Thanks again

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Long list aggregating sheets in same book

    The macro uses the xlPasteAll method, so all the formatting is coming across. You could change that to xlPasteValuesAndNumberFormats, maybe.

    If that's not the problem, perhaps just removing the cs.Columns.AutoFit at the end will solve it.

+ 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