Pivot table Refresh from a change to data validation list change

wisemank

Board Regular
Joined
Jun 21, 2010
Messages
129
I would like to have my pivot table refresh from the drop down data selected. I am refreshing the "Hours required" by selecting different scenarios. This is what I did and nothing updates. The data on my dataset updates but not the pivot table.

Sub UpdateSummary()
'
' UpdateSummary Macro
' Refreshes the Pivot Summary

Range("M4").Select

ActiveWorkbook.RefreshAll
End Sub
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
If you right click on the Tab (sheet name) of the sheet with the input cell and select View Code.
Then in the window that it takes you to paste in the following, does it do what you want ?
(Change the M4 in the intersect line to the input cell)

VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)

    If Not Intersect(Target, Range("M4")) Is Nothing Then   '<--- put the address of your input cell here
        Application.EnableEvents = False
        ' UpdateSummary Macro
        ' Refreshes the Pivot Summary
        Range("M4").Select
        ActiveWorkbook.RefreshAll
        Application.EnableEvents = True
    End If

End Sub
 
Upvote 0

Forum statistics

Threads
1,215,076
Messages
6,122,984
Members
449,092
Latest member
Mr Hughes

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top