{"id":2130,"date":"2022-12-23T15:26:16","date_gmt":"2022-12-23T15:26:16","guid":{"rendered":"https:\/\/www.bizinfograph.com\/resource\/?p=2130"},"modified":"2024-02-28T20:14:15","modified_gmt":"2024-02-28T20:14:15","slug":"refresh-pivot-table-in-excel","status":"publish","type":"post","link":"https:\/\/www.bizinfograph.com\/resource\/refresh-pivot-table-in-excel\/","title":{"rendered":"How to Refresh Pivot Table in Excel?"},"content":{"rendered":"<p>Refresh Pivot Table in Excel to ensure your data analysis remains accurate and up-to-date. By regularly updating your pivot tables, you can maintain the integrity of your reports, make informed decisions based on the latest information, and adapt swiftly to new data trends. This crucial step in data management allows for dynamic reporting and timely insights, making your Excel workflows more efficient and reliable. Embrace the power of refreshing pivot tables to transform your data analysis into a robust, responsive process that consistently supports strategic business decisions.<\/p>\n<h2><strong>Manually refresh Pivot Table<\/strong><\/h2>\n<p>When the existing data source changes and you want to refresh the pivot table to reflect those changes, this approach is the best choice.<\/p>\n<h2><strong>The steps to reload a pivot table are as follows<\/strong><\/h2>\n<p><strong>Step 1: <\/strong>Click the right mouse button on any Pivot Table cell and then choose \u201cRefresh\u201d.<\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter size-full wp-image-2131\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2022\/12\/Refresh-Pivot-Table-1.png\" alt=\"Refresh Pivot Table\" width=\"375\" height=\"260\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2022\/12\/Refresh-Pivot-Table-1.png 375w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2022\/12\/Refresh-Pivot-Table-1-300x208.png 300w\" sizes=\"(max-width: 375px) 100vw, 375px\" \/><\/p>\n<p>The Pivot Table will quickly refresh as a result.<\/p>\n<p>You may also use the keyboard shortcut ALT + F5 to choose any cell in the pivot table.<\/p>\n<p><strong>Quick Tip:<\/strong> It is recommended to utilize an Excel Table to generate the Pivot Table after converting the data source into an Excel Table. In this case, as an Excel Table automatically takes into account newly added rows and columns, you may also utilize the refresh technique to update the Pivot Table also when additional data (rows\/columns) are added to the raw data.<\/p>\n<h2><strong>Refresh Pivot Table on Protected Sheet<\/strong><\/h2>\n<p>You cannot refresh the pivot tables on a worksheet that has been protected. Right-clicking on the pivot table causes the Refresh command to become faint.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter size-full wp-image-2132\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2022\/12\/Refresh-Pivot-Table-2.png\" alt=\"Refresh Pivot Table\" width=\"333\" height=\"335\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2022\/12\/Refresh-Pivot-Table-2.png 333w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2022\/12\/Refresh-Pivot-Table-2-298x300.png 298w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2022\/12\/Refresh-Pivot-Table-2-150x150.png 150w\" sizes=\"(max-width: 333px) 100vw, 333px\" \/><\/p>\n<h2><strong>Here&#8217;s how to avoid the issue<\/strong><\/h2>\n<p><strong>Manually:<\/strong> If you are aware of the password, you can manually unlock the worksheet, update the pivot table, and then re-protect it.<\/p>\n<p><strong>Macros:<\/strong> If you&#8217;re using a macro to update the pivot table, add code to unlock the worksheet, update the pivot table, and then lock it back. An example is shown in this macro.<\/p>\n<p>Sub UnprotectRefresh()<\/p>\n<p>On Error Resume Next<\/p>\n<p>With Activesheet<\/p>\n<p>.Unprotect Password:=&#8221;mypassword&#8221;<\/p>\n<p>.PivotTables(1).RefreshTable<\/p>\n<p>.Protect Password:=&#8221;mypassword&#8221;, _<\/p>\n<p>AllowUsingPivotTables:=True<\/p>\n<p>End With<\/p>\n<p>End Sub<\/p>\n<h2><strong>Refresh\/Update Pivot Table by Changing the Data Source<\/strong><\/h2>\n<p>You must update the pivot table&#8217;s source data if the number of rows and columns in your data set changes.<\/p>\n<p><strong>The procedure of refreshing Pivot Table by changing the data source:<\/strong><\/p>\n<p><strong>Step 1:<\/strong> In the Pivot Table, choose any cell.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-2133 size-full\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2022\/12\/Refresh-Pivot-Table-3.png\" alt=\"Refresh Pivot Table in Excel\" width=\"458\" height=\"200\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2022\/12\/Refresh-Pivot-Table-3.png 458w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2022\/12\/Refresh-Pivot-Table-3-300x131.png 300w\" sizes=\"(max-width: 458px) 100vw, 458px\" \/><\/p>\n<p><strong>Step 2:<\/strong> Click \u201cChange Data Source\u201d under the \u201cData\u201d group on the \u201cPivotTable Analyze\u201d tab.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2134\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2022\/12\/Refresh-Pivot-Table-4.png\" alt=\"Refresh Pivot Table\" width=\"772\" height=\"118\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2022\/12\/Refresh-Pivot-Table-4.png 772w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2022\/12\/Refresh-Pivot-Table-4-300x46.png 300w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2022\/12\/Refresh-Pivot-Table-4-768x117.png 768w\" sizes=\"(max-width: 772px) 100vw, 772px\" \/><\/p>\n<p><strong>Step 3:<\/strong> Update the range to include new data in the \u201cChange PivotTable Data Source\u201d dialog box. After that, click OK.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2135 size-full\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2022\/12\/Refresh-Pivot-Table-5.png\" alt=\"Refresh Pivot Table in Excel\" width=\"643\" height=\"324\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2022\/12\/Refresh-Pivot-Table-5.png 643w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2022\/12\/Refresh-Pivot-Table-5-300x151.png 300w\" sizes=\"(max-width: 643px) 100vw, 643px\" \/><\/p>\n<p>You don&#8217;t need to use the change data source option if you convert the data source to an Excel table and use that table to build the pivot table. The Pivot Table will automatically account for the new rows and columns if you simply refresh it.<\/p>\n<h2><strong>Auto refresh Pivot Table Using a VBA Macro<\/strong><\/h2>\n<p>Even though it just takes two clicks to refresh a Pivot table, you still need to do it each time there is a change.<\/p>\n<p>You can use a straightforward one-line VBA macro code to improve efficiency and have the Pivot Table automatically refresh anytime the data source changes.<\/p>\n<p>The VBA code is as follows:<\/p>\n<p>Private Sub Worksheet_Change(ByVal Target As Range)<\/p>\n<p>Worksheets(&#8220;Sheet1&#8221;).PivotTables(&#8220;PivotTable1&#8221;).PivotCache.Refresh<\/p>\n<p>End Sub<\/p>\n<p><strong>Deciphering the Code:<\/strong> This change event is triggered each time the sheet containing the source data is changed. The code updates the Pivot Cache of the Pivot Table with the name PivotTable1 whenever there is a change.<\/p>\n<p>To make this code work for your workbook, you must make the following changes:<\/p>\n<p>&#8220;Sheet1&#8221; should be replaced with the name of the sheet containing the pivot table in this section of the code.<\/p>\n<p>Replace &#8220;PivotTable1&#8221; with the name of your pivot table. Click anywhere in the Pivot Table and select the Analyze Tab to get the name. The name would be readable under the &#8220;PivotTable Name&#8221; header in the left portion of the ribbon.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2136 size-full\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2022\/12\/Refresh-Pivot-Table-6.png\" alt=\"Refresh Pivot Table in Excel\" width=\"785\" height=\"149\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2022\/12\/Refresh-Pivot-Table-6.png 785w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2022\/12\/Refresh-Pivot-Table-6-300x57.png 300w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2022\/12\/Refresh-Pivot-Table-6-768x146.png 768w\" sizes=\"(max-width: 785px) 100vw, 785px\" \/><\/p>\n<h2><strong>Where to enter this VBA code<\/strong><\/h2>\n<p><strong>Step 1:<\/strong> Hit \u201cAlt and F11\u201d on your keyboard. The VB Editor window will open.<\/p>\n<p>Project Explorer would be on the left in the VB Editor (that has the names of all the worksheets). Press \u201cControl + R\u201d to make it visible if it isn&#8217;t already.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2137 size-full\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2022\/12\/Refresh-Pivot-Table-7.png\" alt=\"Refresh Pivot Table in Excel\" width=\"564\" height=\"327\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2022\/12\/Refresh-Pivot-Table-7.png 564w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2022\/12\/Refresh-Pivot-Table-7-300x174.png 300w\" sizes=\"(max-width: 564px) 100vw, 564px\" \/><\/p>\n<p><strong>Step 2:<\/strong> Double-click on the name of the sheet containing the pivot table in the Project Explorer.<\/p>\n<p>Copy and paste the provided code into the code window on the right, then change the pivot table&#8217;s name and sheet name as necessary.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2138 size-full\" src=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2022\/12\/Refresh-Pivot-Table-8.png\" alt=\"Refresh Pivot Table in Excel\" width=\"644\" height=\"379\" srcset=\"https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2022\/12\/Refresh-Pivot-Table-8.png 644w, https:\/\/www.bizinfograph.com\/resource\/wp-content\/uploads\/2022\/12\/Refresh-Pivot-Table-8-300x177.png 300w\" sizes=\"(max-width: 644px) 100vw, 644px\" \/><\/p>\n<p>Snap the VB Editor shut. Now the Pivot Table would automatically refresh whenever you made any changes to the data source.<\/p>\n<p><strong>Note:<\/strong> Because the workbook contains a macro, save it with the.xls or.xlsm extension.<\/p>\n<h2><strong>Application of Refresh Pivot Table in Excel<\/strong><\/h2>\n<ul>\n<li><strong>Update Data Source Changes<\/strong>: Refresh Pivot Table in Excel to reflect any changes or updates made to the underlying data source, ensuring your pivot table displays the most current information.<\/li>\n<li><strong>Incorporate New Data<\/strong>: After adding new data to your dataset, use the refresh function to update the pivot table, ensuring all new entries are included in your analysis.<\/li>\n<li><strong>Correct Data Discrepancies<\/strong>: If there are discrepancies or errors in your pivot table, refreshing can help realign the data with the source, correcting any inconsistencies.<\/li>\n<li><strong>Dynamic Reporting<\/strong>: Keep your reports up-to-date by refreshing pivot tables regularly, ensuring that reports reflect the latest data for accurate decision-making.<\/li>\n<li><strong>Seasonal or Periodic Analysis<\/strong>: Use the refresh feature to update pivot tables for periodic analyses such as monthly sales, quarterly performance reviews, or annual financial statements.<\/li>\n<li><strong>Automated Data Updates<\/strong>: If your Excel data is connected to external data sources, refreshing pivot tables becomes crucial to load the latest data automatically into your spreadsheet for real-time analysis.<\/li>\n<\/ul>\n<p>For ready-to-use Dashboard Templates:<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\n<li><a href=\"https:\/\/www.bizinfograph.com\/dashboard-templates#Finance\" target=\"_blank\" rel=\"noopener\">Financial Dashboards<\/a><\/li>\n<li><a href=\"https:\/\/www.bizinfograph.com\/dashboard-templates#Sales\" target=\"_blank\" rel=\"noopener\">Sales Dashboards<\/a><\/li>\n<li><a href=\"https:\/\/www.bizinfograph.com\/dashboard-templates#Human-Resource\" target=\"_blank\" rel=\"noopener\">HR Dashboards<\/a><\/li>\n<li><a href=\"https:\/\/www.executiveknowledge.org\/dashboard-templates\/35\" target=\"_blank\" rel=\"noopener\">Data Visualization Charts<\/a><\/li>\n<\/ol>\n<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Refresh Pivot Table in Excel to ensure your data analysis remains accurate and up-to-date. By regularly updating your pivot tables, you can maintain the integrity of your reports, make informed decisions based on the latest information, and adapt swiftly to new data trends. This crucial step in data management allows for dynamic reporting and timely &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/www.bizinfograph.com\/resource\/refresh-pivot-table-in-excel\/\"> <span class=\"screen-reader-text\">How to Refresh Pivot Table in Excel?<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-global-header-display":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","footnotes":""},"categories":[286],"tags":[288,287],"class_list":["post-2130","post","type-post","status-publish","format-standard","hentry","category-refresh-pivot-table","tag-refresh-pivot-table","tag-refresh-pivot-table-in-excel"],"_links":{"self":[{"href":"https:\/\/www.bizinfograph.com\/resource\/wp-json\/wp\/v2\/posts\/2130","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bizinfograph.com\/resource\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bizinfograph.com\/resource\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bizinfograph.com\/resource\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bizinfograph.com\/resource\/wp-json\/wp\/v2\/comments?post=2130"}],"version-history":[{"count":5,"href":"https:\/\/www.bizinfograph.com\/resource\/wp-json\/wp\/v2\/posts\/2130\/revisions"}],"predecessor-version":[{"id":8676,"href":"https:\/\/www.bizinfograph.com\/resource\/wp-json\/wp\/v2\/posts\/2130\/revisions\/8676"}],"wp:attachment":[{"href":"https:\/\/www.bizinfograph.com\/resource\/wp-json\/wp\/v2\/media?parent=2130"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bizinfograph.com\/resource\/wp-json\/wp\/v2\/categories?post=2130"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bizinfograph.com\/resource\/wp-json\/wp\/v2\/tags?post=2130"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}