Insert a blank row in a Pivot table

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all
I'd like to insert a blank row after each subtotal using vb code in pivot
table. All the books I've look at don't talk about it. Is it possible??

TIA
johnb
 
Hi John

Sub test()
ActiveSheet.PivotTables("PivotTable1").PivotFields("Name") _
..LayoutBlankLine = True
End Sub

For Pivot Fields, insert the name of the field which has Subtotals set and
change the Pivot table name to suit.
Setting the value to False will remove the blank line.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top