Hi
I've got two quick questions:
1) Is there a way to check the starting cell of a Pivot table (from a file you've inherited)?
2) What's the best way to copy the data and delete the blank rows from a Pivot Table?
I've written this, but I was wondering if there's a better way?
I've got two quick questions:
1) Is there a way to check the starting cell of a Pivot table (from a file you've inherited)?
2) What's the best way to copy the data and delete the blank rows from a Pivot Table?
I've written this, but I was wondering if there's a better way?
Code:
‘copy data from the Pivot Sheet (assuming it starts in cell A3)
PivotSheet.Activate
Range("A3").CurrentRegion.Copy
Paste it into a new sheet
NewSheet.Activate
Range("A1").PasteSpecial xlPasteValues
'delete the blank rows (the blank rows in this Pivot data appear in columns B:D)
Range("B:D").Select
Selection.SpecialCells(xlCellTypeBlanks).EntireRow.Delete