none
Refreshing queries RRS feed

  • Question

  • Can I just confirm (I couldn't find the answer on the web) how QueryTable.Refresh works.

    I have:
    query 1  - gets its data from 4 sheets in the current workbook
    query 2 - manipulates the data in query 1 and loads the result to the current workbook
    query 3 - gets its data from 1 sheet in the current workbook
    query 4 - manipulates the data in query 2 and loads the results to the current workbook
    query 5 - takes  query 3 and query 4 and manipulates the data from both those and loads the results to the current workbook

    If I refresh the loaded table query 5 using QueryTable.Refresh , I believe all the underlying queries 1 through 4 should be refreshed (rather than just query 5) i.e.any new data in the 5 workbook input sheets should be reflected in the three loaded output tables.

    Is this correct?

    Just trying to get my head around it takes so long to refresh the tables when each of queries performs relatively few transformations and is working on less than 2,000 rows of data.

    Performing the same in Excel using Vlookup() and sumif() is instaneous. Generating the same output via Power pivot as above  takes about 4 minutes.

    Thanks

    Friday, August 23, 2019 12:58 PM