Copying data that has subtotals applied to it will copy all of the data, even the rows that are hidden. Sometimes you just want to copy the totals, and here’s how you do it. Let’s start with some data that has subtotals applied:
Next, we’ll collapse the subtotals using the outline controls on the left so that only the totals rows are shown:
To copy just these rows and omit the rows that are hidden, we must select only the visisble rows. Excel provides us with that function under Edit>Goto (F5). The Goto dialog has a Special button on the bottom left:
That button brings up the Go To Special dialog box. On that dialog, choose Visible cells only. Then just copy and paste normally.