Starting point of a Pivot Table and best way to copy the data from it and delete blank rows

Mr2017

Well-known Member
Joined
Nov 28, 2016
Messages
644
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
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?

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
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

Forum statistics

Threads
1,215,061
Messages
6,122,922
Members
449,094
Latest member
teemeren

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