+ Reply to Thread
Results 1 to 3 of 3

formulas not updating after *single* refresh all

  1. #1
    Registered User
    Join Date
    01-29-2015
    Location
    Austin
    MS-Off Ver
    2013
    Posts
    12

    formulas not updating after *single* refresh all

    Hello Everyone,

    Excel 2010

    I am having an issue where some simple formulas do not update after a single data tab refresh all(ctrl + alt +F5). First I would like to apologize that I will not be able to attach the workbook because the external data is being retrieved from an ODBC source.

    1. This tool starts with an outside query that returns results into a table.
    2. Then there is a static list of items that are needed. There is a vlookup on this static list that will return an item from the outside query in step 1, if present.
    3. Then there is a pivot table with the items from step 2.
    4. Finally, there are some simple formulas count, sum, subtraction, etc that are calculated on the items in the pivot table.

    I refresh the query and everything works up until the simple formulas in step 4. I must refresh twice to get these calculations to update. I have tried to write a macro to update twice, but I am still getting the same problem. It will not update until I run the macro twice. I have tried putting in a time delay in the macro in between refreshes and still no luck.

    Please Login or Register  to view this content.
    The main line in there is:
    Please Login or Register  to view this content.
    Any thoughts or suggestions?

  2. #2
    Forum Expert GeneralDisarray's Avatar
    Join Date
    09-15-2011
    Location
    Pittsburgh, PA, USA
    MS-Off Ver
    Windows Excel 2016
    Posts
    1,416

    Re: formulas not updating after *single* refresh all

    There's a way to "pause" the code until the refresh is completed (from the ODBC source).

    I think you can handle it in the refresh line in your VBA code, by setting a parameter 'BackgroundQuery:=False' -- but you can also set that in the query table itself. Click on the Query table so the "table tools" shows up in the ribbon, then click on Design> Refresh > Connection Properties - then uncheck "Enable Background Refresh".


    ---
    Basically, the code is cruising along without the new data - this will make sure the next line is not executed too soon.


    Not 100% sure if the call you have would take that parameter -- here's how I used it at one point:

    Please Login or Register  to view this content.
    I guess I was refreshing each table that explicitly named to be a database view. I think the reason I did it this way instead of with a 'refreshAll' was I couldn't be sure each table was configured to not allow background refresh.
    Last edited by GeneralDisarray; 07-01-2015 at 03:19 PM.
    Remember, saying thanks only takes a second or two. Click the star icon(*) below the post you liked, to give some Rep if you think an answer deserves it.

    Please,mark your thread [SOLVED] if you received your answer.

  3. #3
    Registered User
    Join Date
    01-29-2015
    Location
    Austin
    MS-Off Ver
    2013
    Posts
    12

    Re: formulas not updating after *single* refresh all

    Thank you very much. This has been solved.

+ 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. Refresh a Single Pivot Table Only?
    By chasfh in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 09-14-2014, 05:30 PM
  2. Formatting not updating upon data connection refresh
    By jmewebb in forum Excel General
    Replies: 1
    Last Post: 06-03-2014, 02:05 PM
  3. Refresh pivot table without updating filter
    By Draagslag in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 04-23-2014, 09:35 AM
  4. Updating/Refresh total Column
    By emina002 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-19-2012, 05:36 AM
  5. Pivot Table not updating even after refresh :(
    By umermariner in forum Excel General
    Replies: 3
    Last Post: 12-04-2011, 11:31 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