Note: This webinar replay is available for a limited time and then it is added to the webinar archives in the VBA Vault
This webinar covers using VBA to create and use a Pivot Table.
- Live VBA Coding
- How to Create a Pivot Table using VBA
- Grouping By days, months and years
- How to add slicers
- How to add columns and rows
- How to add values and filters
- Plus Q&A as well as tons of tips and tricks
The webinar workbook and diagrams will be made available when this webinar is add to the VBA Vault.
The Excel VBA Handbook – Learn VBA by building 10 VBA applications from scratch.
The VBA Vault – Archive of Webinars and Tutorials with 40+ exercises and 60+ coding examples.
Someone asked on the webinar how to use a slicer on multiple PivotTables.
It’s actually quite easy to do. You create the Slicer as normal and then add a second Pivot Table to the cache.
See the example code below
Public Sub CreateSlicer() ' Get the pivot tables Dim pt As PivotTable, pt2 As PivotTable Set pt = shPivot.PivotTables(1) Set pt2 = shPivot.PivotTables(2) ' Create the cache Dim sc As SlicerCache Set sc = ThisWorkbook.SlicerCaches.Add2(pt, "Marketplace") ' Create the slicer Dim sl As Slicer Set sl = sc.Slicers.Add(shPivot) ' Add the second Pivot table sc.PivotTables.AddPivotTable pt2 End Sub
Note: To watch the video at the highest quality, click on HD at the bottom of the video and set to the highest setting.