Add row to pivottable RRS feed

  • Question

  • Currently I'm working on a excel file with multiple pivottables. What i'm trying to accomplish is to increase a pivottable with one row. The code that i'm getting if I do this manualy is the following:

    ActiveSheet.ListObjects("General").Resize Range("$A$6:$H$17")

    This action is increasing the range from A6:H16 to A6:H17 so only 1 row. Next time the range need to be increased from A6:H17 to A6:H18 and so on.

    How can I automate this in VBA?

    Thursday, December 8, 2011 10:00 AM


  • With ActiveSheet.ListObjects("General")
    .Resize Range(.Range.Resize(.Range.Rows.Count + 1, .Range.Columns.Count).Address)
    End With

    HTH, Bernie
    • Marked as answer by N.Blownaparte Friday, December 9, 2011 7:24 AM
    Thursday, December 8, 2011 3:40 PM