+ Reply to Thread
Results 1 to 4 of 4

Coping Data from 800+ Sheets to Master Table using VBA

  1. #1
    Registered User
    Join Date
    11-07-2013
    Location
    Canada
    MS-Off Ver
    Office 365
    Posts
    14

    Coping Data from 800+ Sheets to Master Table using VBA

    New to using VBA for anything other than simple recorded Macros.

    I've inherited a workbook that is currently using indirect formulas to refence cells across the workbook. The problem with that is there's about 800 worksheets and 125 columns in the master table. In order for to workbook to be functional currently auto calculate formulas is off and there's a macro to enable it to refresh the data. There's an effort to put this into a database but that's going to take longer than then our current needs.

    I want to get rid of the indirect formulas to make the workbook more stable.

    I need to build a master table that displays the data from each worksheet. The worksheets are form based so it's not simply coping several tables into one. I've tried recording a macro to do the copy and it works partially. It's super massive with the 125 fields and doesn't shift to the next row as we move to the next worksheet.

    If someone could help on making the code cleaner and help on moving to the next row I'd appreciate it. Below is a shorter version of the code, only 2 examples not all 125.

    Please Login or Register  to view this content.
    Last edited by kevindub; 01-07-2021 at 02:26 PM.

  2. #2
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070

    Re: Coping Data from 800+ Sheets to Master Table using VBA

    Hello,

    With your description of the problem :
    1. New to VBA
    2. 800 + sheets to combine
    3. The current macro which is far from 'ideal'
    ....

    Would recommend to start from scratch and use Power Query ...
    HTH
    Carim


    Top Excel Links

  3. #3
    Registered User
    Join Date
    11-07-2013
    Location
    Canada
    MS-Off Ver
    Office 365
    Posts
    14

    Re: Coping Data from 800+ Sheets to Master Table using VBA

    Thanks Carim. I was thinking to make tables for each sheet that could then be pulled into a master table to avoid VBA and indirect references. The only problem I can see is that the sheets change on a bi-weekly basis.

    The 800 sheets can have a net change of +- 50 with up to 100 add/remove. Not sure if table and query would survive the changes.

  4. #4
    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,855

    Re: Coping Data from 800+ Sheets to Master Table using VBA

    I agree with Carim. PQ may be a more efficient way as it will continually update changes.

    To better understand PQ,

    Power Query is a free AddIn for Excel 2010 and 2013, and is built-in functionality from Excel 2016 onwards (where it is referred to as "Get & Transform Data").

    It is a powerful yet simple way of getting, changing and using data from a broad variety of sources, creating steps which may be easily repeated and refreshed. I strongly recommend learning how to use Power Query - it's among the most powerful functionalities of Excel.

    - Follow this link to learn how to install Power Query in Excel 2010 / 2013.

    - Follow this link for an introduction to Power Query functionality.
    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

+ 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. Replicate data from multiple sheets in Master table
    By t.regi in forum Excel General
    Replies: 2
    Last Post: 08-11-2015, 01:41 AM
  2. [SOLVED] How to consolidate all data from multiple sheets into a master table.
    By marcusduton in forum Excel General
    Replies: 0
    Last Post: 02-26-2015, 11:55 PM
  3. [SOLVED] Create a master table with data from two sheets
    By Lija in forum Excel General
    Replies: 3
    Last Post: 05-14-2013, 07:51 AM
  4. [SOLVED] Coping data from one sheet to other related sheets
    By Skidder in forum Excel General
    Replies: 22
    Last Post: 04-23-2012, 04:34 AM
  5. Coping data between sheets based on conditions
    By Phosphonothioic in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-24-2011, 11:28 AM
  6. Coping Data from multi sheets to a single sheet via criteria
    By airbus319uk in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-06-2010, 08:42 AM
  7. coping data without coping formulars
    By stevekirk in forum Excel General
    Replies: 6
    Last Post: 09-07-2006, 11:47 AM

Tags for this Thread

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