Pinterest Pixel

Disable/Enable Get Pivot Data Using Macros In Excel

Bryan
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!

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!

Disable/Enable Get Pivot Data Using Macros In Excel

Make sure your Excel has the Developer Tab enabled following this tutorial.

I explain how you can do this below step by step!

What does it do?

Disable / Enable Get Pivot Data

Copy Source Code:


Sub EnableGetPivotData()
Application.GenerateGetPivotData = True
End Sub

Sub DisableGetPivotData()
Application.GenerateGetPivotData = False
End Sub

Final Result: 

Disable/Enable Get Pivot Data Using Macros In Excel

Exercise Workbook:

Disable/Enable Get Pivot Data Using Macros In Excel | MyExcelOnline

Download excel workbookDisable-Enable-Get-Pivot-Data.xlsm


Here is our pivot table:

Disable/Enable Get Pivot Data Using Macros In Excel

If we try to create a formula involving one of the cells inside the Pivot Table, you will see the GETPIVOTDATA Formula. Let us change this behavior using Macros!

Disable/Enable Get Pivot Data Using Macros In Excel

STEP 1: Go to Developer > Code > Visual Basic

Disable/Enable Get Pivot Data Using Macros In Excel | MyExcelOnline

 

STEP 2: Paste in your code and Select Save. This will create two options for you to choose either to enable or disable. Close the window afterwards.

See also  Save Selected Range as PDF Using Macros In Excel

Disable/Enable Get Pivot Data Using Macros In Excel

 

STEP 3: Let us test it out!

Open the sheet containing the data. Go to Developer > Code > Macros

Disable/Enable Get Pivot Data Using Macros In Excel | MyExcelOnline

 

Make sure your disable macro is selected. Click Run.

Disable/Enable Get Pivot Data Using Macros In Excel

 

Try referencing a cell inside the pivot table again. It is now a normal cell reference.

With just one click, we have disabled get pivot data!

 Disable/Enable Get Pivot Data Using Macros In Excel

 

How to Disable/Enable Get Pivot Data Using Macros In Excel

 

101 Macros Book

If you like this Excel tip, please share it


Star 30 Days - Full Access Star

One Dollar Trial

$1 Trial for 30 days!

Access for $1

Cancel Anytime

One Dollar Trial
  • Get FULL ACCESS to all our Excel & Office courses, bonuses, and support for just USD $1 today! Enjoy 30 days of learning and expert help.
  • You can CANCEL ANYTIME — no strings attached! Even if it’s on day 29, you won’t be charged again.
  • You'll get to keep all our downloadable Excel E-Books, Workbooks, Templates, and Cheat Sheets - yours to enjoy FOREVER!
  • Practice Workbooks
  • Certificates of Completion
  • 5 Amazing Bonuses
Satisfaction Guaranteed
Accepted paymend methods
Secure checkout

Get Video Training

Advance your Microsoft Excel & Office Skills with the MyExcelOnline Academy!

Dramatically Reduce Repetition, Stress, and Overtime!
Exponentially Increase Your Chances of a Promotion, Pay Raise or New Job!

Learn in as little as 5 minutes a day or on your schedule.

Learn More!

Share to...