Excel dependent drop down list from pivot table
Change PivotTable data source using a drop-down listAuthor: Oscar Cronquist Article last updated on February 24, 2019 Show In this article, I am going to show you how to quickly change Pivot Table data source using a drop-down list. The tutorial workbook contains three different tables (Table1, Table2 and Table3) with identical column headers. In this tutorial:
Create a Combo Box (Form Control)
Want to learn more about Combo Boxes? Read this article: Working with COMBO BOXES [Form Controls] This blog post demonstrates how to create, populate and change comboboxes (form control) programmatically. Form controls are not as flexible [] Working with COMBO BOXES [Form Controls] Select input range
Cell range D2:D4 contains the table names, you probably need to change these names. Add VBA code to your workbook
For this code to work you need to change pivot table name (bolded) in vba code: PivotTables("PivotTable1") to the name of your specific pivot table. Note, remember to save our workbook with file extension *.xlsm (macro-enabled workbook) in order to keep the VBA code attached to the workbook. Assign a macro
Get the Excel filePivot-table-change-data-source-range-vba.xlsm Weekly Blog EMAIL [newsletter_signup_form id=1]Feel free to comment and ask Excel questions. Make sure you subscribe to my newsletter so you don't miss new blog articles. Related articlesApply dependent combo box selections to a filter Josh asks: now if i only knew how to apply these dependent dropdown selections to a filter, i'd be set. [] Working with COMBO BOXES [Form Controls] This blog post demonstrates how to create, populate and change comboboxes (form control) programmatically. Form controls are not as flexible [] Create dependent drop down lists containing unique distinct values This article explains how to build dependent drop down lists. Here is a list of order numbers and products. We [] Populate drop down list with unique distinct values sorted from A to Z Question: How do I create a drop-down list with unique distinct alphabetically sorted values? Table of contents Sort values using [] Apply dependent combo box selections to a filter Josh asks: now if i only knew how to apply these dependent dropdown selections to a filter, i'd be set. [] Auto refresh a pivot table In a previous post:How to create a dynamic pivot table and refresh automatically I demonstrated how to refresh a pivot [] Use hyperlinks in a pivot table Sean asks: Basically, when I do a refresh of the data in the "pivotdata" worksheet, I need it to recognise [] Comments (20) 20 Responses to Change PivotTable data source using a drop-down list
Leave a ReplyClick here to cancel reply. Name (required) Mail (will not be published) (required) Website
Δ How to commentHow to add a formula to your comment How to add VBA code to your comment How to add a picture to your comment: Contact Oscar You can contact me through this contact form |