+ Reply to Thread
Results 1 to 7 of 7

Macro to build a table from multiple sheets

  1. #1
    Forum Contributor
    Join Date
    12-02-2008
    Location
    Brisbane
    MS-Off Ver
    2016
    Posts
    807

    Macro to build a table from multiple sheets

    I have a workbook with over 100 sheets. I am trying to build a table from data on the sheets.

    The invoice number is always in the same cell
    The data always start in the same row but have variable number of rows populated.

    I can sort of getting it working but I can't get the 'goto next sheet' bit to work.

    Thanks for any assistance. I've attached a sample workbook.
    Attached Files Attached Files

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,858

    Re: Macro to build a table from multiple sheets

    I don't see any code in your workbook. I don't understand where the invoice number is coming from. Your explanation of what you want specifically is unclear.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Contributor
    Join Date
    12-02-2008
    Location
    Brisbane
    MS-Off Ver
    2016
    Posts
    807

    Re: Macro to build a table from multiple sheets

    Hi alansidman

    Each invoice has the number in cell G9.

    This is a sample I've created and not the original which has sensitive information. That one has the macro but it doesn't work.

  4. #4
    Forum Contributor
    Join Date
    12-02-2008
    Location
    Brisbane
    MS-Off Ver
    2016
    Posts
    807

    Re: Macro to build a table from multiple sheets

    Specifically, I'm trying to build a table - in the Sample it's the front sheet - with the sales data from all the sheets in the workbook.

  5. #5
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,858

    Re: Macro to build a table from multiple sheets

    Firstly, VBA does not like merged cells, so you will need to unmerge the cells in columns D & E

    Then, hopefully, I understood what you wanted. Here is my take on my understanding.

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    12-02-2008
    Location
    Brisbane
    MS-Off Ver
    2016
    Posts
    807

    Re: Macro to build a table from multiple sheets

    Exactly what I wanted! I now understand where I went wrong with my code.

    Thanks - I'm grateful for your help.

  7. #7
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,858

    Re: Macro to build a table from multiple sheets

    Thanks for the Rep. If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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 build summary table
    By maxbur123 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-19-2016, 09:52 AM
  2. How to build a macro with DeleteObject to delete a table.
    By FLCRUCET in forum Access Tables & Databases
    Replies: 1
    Last Post: 03-31-2013, 06:30 PM
  3. Trying to build Macro to password protect all sheets in workbook
    By eatmorecheese in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-11-2012, 12:07 PM
  4. Trying to build a master spreadsheet to pull hours from multiple time sheets
    By roxannek in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 04-06-2012, 12:28 AM
  5. VBA/Macro Build for sending data to different sheets
    By derivative_x in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-08-2011, 03:59 PM
  6. Macro to Build a Pivot Table
    By Staci in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-26-2011, 04:40 PM
  7. How can I build a pivot table from multiple worksheets which are .
    By Richard Stephens in forum Excel General
    Replies: 2
    Last Post: 02-26-2005, 07:06 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