+ Reply to Thread
Results 1 to 2 of 2

Macro for connecting tables to PowerQuery

  1. #1
    Registered User
    Join Date
    05-30-2019
    Location
    Texas
    MS-Off Ver
    365
    Posts
    3

    Macro for connecting tables to PowerQuery

    I have a workbook with ~1000 sheets, each sheet contains a table with different column headers. A lot of the headers are the same/repeat but there are some tables with unique columns. I am trying to append the tables so that the data is consolidated while also accounting for any unique columns. I was thinking to use PowerQuery to do this but connecting each table will take far too long.

    Does any one know of an easier way to approach this? Is it possible to create a macro that would connect each table to PowerQuery? I'm very new to VBA so I would need some assistance with the macro option :/

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

    Re: Macro for connecting tables to PowerQuery

    Before you even attempt to append the worksheets in Power Query, you will need to have the column sequences identical.

    Look at this tutorial on how to append all your tables in one go without VBA.

    https://www.youtube.com/watch?v=YOC-pEIuHpA
    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. Question about connecting data on Tables
    By bankerguy in forum Excel General
    Replies: 1
    Last Post: 01-14-2019, 06:01 PM
  2. Refreshing PowerQuery Tables on a Protected Sheet
    By boxahoy in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 10-20-2017, 07:26 AM
  3. Replies: 0
    Last Post: 07-15-2017, 01:50 PM
  4. Connecting two or more pivot tables from one slicer
    By meus in forum Excel Charting & Pivots
    Replies: 5
    Last Post: 02-03-2016, 01:11 PM
  5. Connecting two tables with common column
    By narendrabr in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-10-2013, 01:04 AM
  6. Connecting to access tables
    By dave_the_bear in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-10-2012, 04:22 AM
  7. [SOLVED] Excel Pivot tables connecting to sql
    By Justin in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-04-2006, 12:55 PM

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