• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
    • Password Reset
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

Pivot table will not refresh!!!!!|VBA & Macros|Excel Forum|My Online Training Hub

You are here: Home / Pivot table will not refresh!!!!!|VBA & Macros|Excel Forum|My Online Training Hub
Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search|Last Search Results
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumVBA & MacrosPivot table will not refresh!!!!!
sp_PrintTopic sp_TopicIcon
Pivot table will not refresh!!!!!
Avatar
Jessica Stewart
Northern USA
Member
Members


Trusted Members
Level 0
Forum Posts: 202
Member Since:
February 13, 2021
sp_UserOfflineSmall Offline
1
February 1, 2022 - 5:06 am
sp_Permalink sp_Print

I'm at my wits end! No matter what I do I CANNOT get my pivot table to refresh without running the code twice. I know the issue, I just can't figure out how to get around the issue. I have a table that is my input table, I then use PQ to clean up the data and use that table to feed through to a pivot table. When I update I need to update the PQ table first in order to refresh my pivot but I can't get it to work without running the macro twice, HELP PLEASE! I will love you forever! Workbook attached, and I am using Excel 2013.

sp_AnswersTopicSeeAnswer See Answer
Avatar
Velouria
London or thereabouts
Moderator
Members


Trusted Members

Moderators
Level 4
Forum Posts: 616
Member Since:
November 1, 2018
sp_UserOnlineSmall Online
2
February 1, 2022 - 5:30 am
sp_Permalink sp_Print

Do you actually need the table on a worksheet?

Avatar
Jessica Stewart
Northern USA
Member
Members


Trusted Members
Level 0
Forum Posts: 202
Member Since:
February 13, 2021
sp_UserOfflineSmall Offline
3
February 1, 2022 - 6:49 am
sp_Permalink sp_Print

I don't know a whole lot about PQ, this is the first project I've tried it on. As long as it can be used to feed the pivot table, no the table result from PQ doesn't need to be seen or used by the end user.

Avatar
Velouria
London or thereabouts
Moderator
Members


Trusted Members

Moderators
Level 4
Forum Posts: 616
Member Since:
November 1, 2018
sp_UserOnlineSmall Online
4
February 1, 2022 - 9:15 pm
sp_Permalink sp_Print sp_EditHistory

Make it a connection only query, then use that as the source (choose external data) for the pivot table.

 

Something like the attached (you have to recreate the pivot unfortunately)

sp_AnswersTopicAnswer
Answers Post
Avatar
Jessica Stewart
Northern USA
Member
Members


Trusted Members
Level 0
Forum Posts: 202
Member Since:
February 13, 2021
sp_UserOfflineSmall Offline
5
February 2, 2022 - 1:52 am
sp_Permalink sp_Print

I made the changes you suggested - thank you so much! I was debating whether to hide the sheet in the end! Nifty trick! But my pivot table is still not loading unless I manually refresh the query, I'm not seeing that you added any code to the worksheet change event so I assume it's a refresh setting in the query but I can't find it? What am I missing?

Avatar
Velouria
London or thereabouts
Moderator
Members


Trusted Members

Moderators
Level 4
Forum Posts: 616
Member Since:
November 1, 2018
sp_UserOnlineSmall Online
6
February 2, 2022 - 2:17 am
sp_Permalink sp_Print

I amended the code  you had in the Worksheet_Deactivate event to simply refresh the pivot.

Avatar
Jessica Stewart
Northern USA
Member
Members


Trusted Members
Level 0
Forum Posts: 202
Member Since:
February 13, 2021
sp_UserOfflineSmall Offline
7
February 2, 2022 - 2:35 am
sp_Permalink sp_Print

Yes I saw that, I made that change too. It's not refreshing unless I do a manual refresh of query on my original worksheet. I'm not sure if there's a setting on automatically refreshing the query that I missed in your attachment - because yours works perfectly! I'll attach my worksheet with the changes I've made. I appreciate your help!

Avatar
Jessica Stewart
Northern USA
Member
Members


Trusted Members
Level 0
Forum Posts: 202
Member Since:
February 13, 2021
sp_UserOfflineSmall Offline
8
February 2, 2022 - 3:16 am
sp_Permalink sp_Print

I got it, thank you so much! I had the data added to the data model, once I removed that it is working now. Because I was an American teenager in the 90's and I'm feeling nostalgic, you are da bomb dot com! I appreciate all of you help.

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Velouria, Jack Brett, Ivica Cvetkovski
Guest(s) 11
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 870
Purfleet: 412
Frans Visser: 346
David_Ng: 306
lea cohen: 219
A.Maurizio: 202
Jessica Stewart: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
Hayden Hao
Angela chen
Sean Moore
John Chisholm
vexokeb sdfg
John Jack
Malcolm Toy
Ray-Yu Yang
George Shihadeh
Naomi Rumble
Forum Stats:
Groups: 3
Forums: 24
Topics: 6211
Posts: 27239

 

Member Stats:
Guest Posters: 49
Members: 31891
Moderators: 3
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: MOTH Support, Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.