Grant has attended:
Excel VBA Intro Intermediate course
Excel VBA Intro Intermediate course
Pivot tables in VBA
When working the VBA pivot examples with Carlos we discovered that the code we used to select the underlying database broke down when there were gaps in the data in the rightmost column i.e. it would no longer select the full database, stopping at the row with the gap. I would be grateful for an answer on how to adjust the code to select the full dataset even if there was a hole (empty cells) in the data. Thank you!
RE: pivot tables in VBA
Hi Grant
Since in most data tables the first cell has always got data in it by using CurrentRegion you can select the whole table even if some cells in the first and last columns are blank
Set DataRange = Range("A9").CurrentRegion
Hope this helps
Carlos