{"id":11307,"date":"2020-01-06T12:04:26","date_gmt":"2020-01-06T11:04:26","guid":{"rendered":"https:\/\/www.myexcelonline.com\/?p=11307"},"modified":"2024-02-06T16:17:03","modified_gmt":"2024-02-06T15:17:03","slug":"disable-enable-get-pivot-data-using-macros-in-excel","status":"publish","type":"post","link":"https:\/\/www.myexcelonline.com\/meo-staging\/blog\/disable-enable-get-pivot-data-using-macros-in-excel\/","title":{"rendered":"Disable\/Enable Get Pivot Data Using Macros In Excel"},"content":{"rendered":"<p>When you wanted to reference a cell in a <a class=\"wpil_keyword_link\" href=\"https:\/\/www.myexcelonline.com\/meo-staging\/blog\/101-excel-pivot-tables\/\" target=\"_blank\" rel=\"noopener\" title=\"Pivot Table\" data-wpil-keyword-link=\"linked\">Pivot Table<\/a>, a GETPIVOTDATA formula shows up instead. If you want to have just a normal cell reference show up, you can <strong>disable\/enable get pivot data<\/strong> using Excel <a class=\"wpil_keyword_link\" href=\"https:\/\/www.myexcelonline.com\/meo-staging\/blog\/101-excel-macros-examples\/\" target=\"_blank\" rel=\"noopener\" title=\"Macros\" data-wpil-keyword-link=\"linked\">Macros<\/a>!<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"Disable\/Enable Get Pivot Data Using Macros In Excel\"  class=\"aligncenter wp-image-12060\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/05\/Disable-Enable-Get-Pivot-Data-02.jpg\" alt=\"Disable\/Enable Get Pivot Data Using Macros In Excel\" width=\"376\" height=\"226\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/05\/Disable-Enable-Get-Pivot-Data-02.jpg 719w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/05\/Disable-Enable-Get-Pivot-Data-02-300x180.jpg 300w\" sizes=\"(max-width: 376px) 100vw, 376px\" \/><\/p>\n<p>Make sure your Excel has the Developer Tab enabled following\u00a0<a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/blog\/how-to-create-your-first-macro-button-in-excel-beginners-tutorial\/\" target=\"_blank\" rel=\"noopener noreferrer\">this tutorial<\/a>.<\/p>\n<p>I explain how you can do this below step by step!<\/p>\n<p><em><strong>What does it do?<\/strong><\/em><\/p>\n<p>Disable \/ Enable Get Pivot Data<\/p>\n<p><em><strong>Copy Source Code:<\/strong><\/em><\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">\r\n\r\nSub EnableGetPivotData()\r\nApplication.GenerateGetPivotData = True\r\nEnd Sub\r\n\r\nSub DisableGetPivotData()\r\nApplication.GenerateGetPivotData = False\r\nEnd Sub\r\n\r\n<\/pre>\n<p><em><strong>Final Result:\u00a0<\/strong><\/em><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"Disable\/Enable Get Pivot Data Using Macros In Excel\"  class=\"aligncenter size-full wp-image-12063\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/05\/Disable-Enable-Get-Pivot-Data-05.jpg\" alt=\"Disable\/Enable Get Pivot Data Using Macros In Excel\" width=\"608\" height=\"404\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/05\/Disable-Enable-Get-Pivot-Data-05.jpg 608w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/05\/Disable-Enable-Get-Pivot-Data-05-300x199.jpg 300w\" sizes=\"(max-width: 608px) 100vw, 608px\" \/><\/p>\n<p><em><strong>Exercise Workbook:<\/strong><\/em><\/p>\n<div class=\"after-post-box\">\n<p><iframe src=\"https:\/\/www.youtube.com\/embed\/WWg8Ba95MQ4?rel=0 \" width=\"800\" height=\"400\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><span data-mce-type=\"bookmark\" style=\"display: inline-block; width: 0px; overflow: hidden; line-height: 0;\" class=\"mce_SELRES_start\">\ufeff<\/span><\/iframe><a href=\"https:\/\/www.youtube.com\/c\/MyExcelOnlinecomtutorials?sub_confirmation=1\" target=\"_blank\" rel=\"noopener noreferrer nofollow\"><img loading=\"lazy\" decoding=\"async\" class=\"alignmiddle wp-image-111468 size-full\" style=\"vertical-align: middle;\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/04\/1.yt_.png\" alt=\"\" title=\"\"><\/a><\/p>\n<p class=\"line-two\"><a class=\"IRPP_minimalist icon-download button small\" href=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/05\/Disable-Enable-Get-Pivot-Data.xlsm\" target=\"_blank\" rel=\"noopener noreferrer\" data-leadbox=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/05\/Disable-Enable-Get-Pivot-Data.xlsm\" data-leadbox-id=\"147284833f72a2:12f08263ab46dc\"><span class=\"ctaText px-3 text-capitalize\">Download excel workbook<i class=\"fa fa-download\"><\/i><\/span><span class=\"postTitle px-3\">Disable-Enable-Get-Pivot-Data.xlsm<\/span><\/a><\/p>\n<p class=\"line-two\">\n<\/div>\n<hr \/>\n<p>Here is our pivot table:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"Disable\/Enable Get Pivot Data Using Macros In Excel\"  class=\"aligncenter size-full wp-image-12059\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/05\/Disable-Enable-Get-Pivot-Data-01.jpg\" alt=\"Disable\/Enable Get Pivot Data Using Macros In Excel\" width=\"304\" height=\"413\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/05\/Disable-Enable-Get-Pivot-Data-01.jpg 304w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/05\/Disable-Enable-Get-Pivot-Data-01-221x300.jpg 221w\" sizes=\"(max-width: 304px) 100vw, 304px\" \/><\/p>\n<p>If we try to create a <a class=\"wpil_keyword_link\" href=\"https:\/\/www.myexcelonline.com\/meo-staging\/blog\/top-excel-formulas-function-examples-to-get-better-at-microsoft-excel\/\" target=\"_blank\" rel=\"noopener\" title=\"formula\" data-wpil-keyword-link=\"linked\">formula<\/a> involving one of the cells inside the Pivot Table, you will see the <strong>GETPIVOTDATA Formula<\/strong>. Let us change this behavior using Macros!<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"Disable\/Enable Get Pivot Data Using Macros In Excel\"  class=\"aligncenter size-full wp-image-12060\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/05\/Disable-Enable-Get-Pivot-Data-02.jpg\" alt=\"Disable\/Enable Get Pivot Data Using Macros In Excel\" width=\"719\" height=\"432\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/05\/Disable-Enable-Get-Pivot-Data-02.jpg 719w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/05\/Disable-Enable-Get-Pivot-Data-02-300x180.jpg 300w\" sizes=\"(max-width: 719px) 100vw, 719px\" \/><\/p>\n<p><span style=\"color: #ff0000;\"><strong>STEP 1:<\/strong><\/span>\u00a0Go to\u00a0<em><strong>Developer &gt; Code &gt; Visual Basic<\/strong><\/em><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-10906 aligncenter\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/01\/How-to-Insert-Multiple-Columns-01.jpg\" alt=\"\" width=\"816\" height=\"139\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/01\/How-to-Insert-Multiple-Columns-01.jpg 816w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/01\/How-to-Insert-Multiple-Columns-01-300x51.jpg 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/01\/How-to-Insert-Multiple-Columns-01-768x131.jpg 768w\" sizes=\"(max-width: 816px) 100vw, 816px\" title=\"\"><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #ff0000;\"><strong>STEP 2:<\/strong><\/span>\u00a0Paste in your code and\u00a0<strong>Select Save<\/strong>. This will create two options for you to choose either to enable or disable. Close the window afterwards.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"Disable\/Enable Get Pivot Data Using Macros In Excel\"  class=\"aligncenter size-full wp-image-12061\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/05\/Disable-Enable-Get-Pivot-Data-03.jpg\" alt=\"Disable\/Enable Get Pivot Data Using Macros In Excel\" width=\"1389\" height=\"593\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/05\/Disable-Enable-Get-Pivot-Data-03.jpg 1389w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/05\/Disable-Enable-Get-Pivot-Data-03-300x128.jpg 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/05\/Disable-Enable-Get-Pivot-Data-03-1024x437.jpg 1024w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/05\/Disable-Enable-Get-Pivot-Data-03-768x328.jpg 768w\" sizes=\"(max-width: 1389px) 100vw, 1389px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #ff0000;\"><strong>STEP 3:\u00a0<\/strong><\/span>Let us test it out!<\/p>\n<p>Open the sheet containing the data. Go to\u00a0<em><strong>Developer &gt; Code &gt; Macros<\/strong><\/em><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-11245\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/03\/Unmerge-Cells-02.jpg\" alt=\"\" width=\"854\" height=\"142\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/03\/Unmerge-Cells-02.jpg 854w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/03\/Unmerge-Cells-02-300x50.jpg 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/03\/Unmerge-Cells-02-768x128.jpg 768w\" sizes=\"(max-width: 854px) 100vw, 854px\" title=\"\"><\/p>\n<p>&nbsp;<\/p>\n<p>Make sure your disable <a class=\"wpil_keyword_link\" href=\"https:\/\/www.myexcelonline.com\/meo-staging\/blog\/101-excel-macros-examples\/\" target=\"_blank\" rel=\"noopener\" title=\"macro\" data-wpil-keyword-link=\"linked\">macro<\/a> is selected. Click <strong>Run<\/strong>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" title=\"Disable\/Enable Get Pivot Data Using Macros In Excel\"  class=\"aligncenter size-full wp-image-12062\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/05\/Disable-Enable-Get-Pivot-Data-04.jpg\" alt=\"Disable\/Enable Get Pivot Data Using Macros In Excel\" width=\"986\" height=\"615\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/05\/Disable-Enable-Get-Pivot-Data-04.jpg 986w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/05\/Disable-Enable-Get-Pivot-Data-04-300x187.jpg 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/05\/Disable-Enable-Get-Pivot-Data-04-768x479.jpg 768w\" sizes=\"(max-width: 986px) 100vw, 986px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>Try referencing a cell inside the pivot table again. It is now a normal cell reference.<\/p>\n<p>With just one click, <strong>we have disabled get pivot data<\/strong>!<\/p>\n<p><span style=\"color: #0000ff;\"><strong>\u00a0<img loading=\"lazy\" decoding=\"async\" title=\"Disable\/Enable Get Pivot Data Using Macros In Excel\"  class=\"aligncenter size-full wp-image-12063\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/05\/Disable-Enable-Get-Pivot-Data-05.jpg\" alt=\"Disable\/Enable Get Pivot Data Using Macros In Excel\" width=\"608\" height=\"404\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/05\/Disable-Enable-Get-Pivot-Data-05.jpg 608w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/05\/Disable-Enable-Get-Pivot-Data-05-300x199.jpg 300w\" sizes=\"(max-width: 608px) 100vw, 608px\" \/><\/strong><\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #0000ff;\"><strong>How to Disable\/Enable Get Pivot Data Using Macros In Excel<\/strong><\/span><\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/www.myexcelonline.com\/meo-staging\/100-66.html\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-13266\" src=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/10\/101-Macros-Book.png\" alt=\"101 Macros Book\" width=\"1200\" height=\"628\" srcset=\"https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/10\/101-Macros-Book.png 1200w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/10\/101-Macros-Book-300x157.png 300w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/10\/101-Macros-Book-1024x536.png 1024w, https:\/\/www.myexcelonline.com\/meo-staging\/wp-content\/uploads\/2019\/10\/101-Macros-Book-768x402.png 768w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" title=\"\"><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When you wanted to reference a cell in a Pivot Table, a GETPIVOTDATA formula shows up instead. If you want to have just a normal cell reference show up, you can disable\/enable get pivot data using Excel Macros! Make sure your Excel has the Developer Tab enabled following\u00a0this tutorial. I explain how you can do [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":18069,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"cos_headline_score":0,"cos_seo_score":0,"cos_headline_text":"","cos_headline_has_been_analyzed":false,"cos_last_analyzed_headline":[],"om_disable_all_campaigns":false},"categories":[56,643],"tags":[106],"acf":[],"_links":{"self":[{"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/posts\/11307"}],"collection":[{"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/comments?post=11307"}],"version-history":[{"count":0,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/posts\/11307\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/media\/18069"}],"wp:attachment":[{"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/media?parent=11307"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/categories?post=11307"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.myexcelonline.com\/meo-staging\/wp-json\/wp\/v2\/tags?post=11307"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}