+ Reply to Thread
Results 1 to 3 of 3

Store query results as permanent data?

  1. #1
    Registered User
    Join Date
    06-10-2019
    Location
    California, USA
    MS-Off Ver
    Office 365
    Posts
    19

    Store query results as permanent data?

    Hello,

    I'm trying to automate a manual process I run every week. I export data from a database that includes hundreds of rows to an excel file. One of the columns in the rows is a "hours" column. I subtotal that column and store that value in a cell in another Excel file. I've gotten to the point where I can use a Webquery to pull the data down in to Excel. I've made a pivot table to sum up the hours and then the final table uses a formula to reference the total hours from the pivot table in the cell I need it. The problem I have is that over time, the amount of data downloaded gets rather large. I'd like to configure the query so that is filters the downloaded results by a date range. I know how to do this, part - but my problem is that each week, if the data downloaded a filtered to the current weeks data, then the previous data is wiped out of the final table. So, my question is... Is there a way to take the "total hours" for a week from the pivot table and store it in a cell as a permanent value. I know I can copy/paste as values, but I want an automated method. I want to just open the excel file, have it "refresh data" and my final table is updated without losing the previous data. Is this possible?

    Thanks,

    Mr. Z

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,853

    Re: Store query results as permanent data?

    You will need a VBA procedure for this - shall I move the thread for you?
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    06-10-2019
    Location
    California, USA
    MS-Off Ver
    Office 365
    Posts
    19

    Re: Store query results as permanent data?

    Yes please.

+ 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. Append and Store data using Power Query function
    By anay_zinje in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-27-2021, 11:51 AM
  2. Append and Store data using Power Query function
    By anay_zinje in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 04-27-2021, 11:07 AM
  3. How to store query data into dynamic array?
    By VAer in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-30-2018, 10:11 AM
  4. Replies: 15
    Last Post: 05-10-2015, 05:13 PM
  5. How can I automatically store web query results in another Excel worksheet?
    By stormspike in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-14-2010, 11:01 AM
  6. making macro results permanent
    By brownstuff in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-19-2009, 11:23 AM
  7. [SOLVED] Data too large for Excel, need to query Access data for results
    By Susan in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-09-2006, 11:10 AM

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