PDA

View Full Version : Solved: Excel VBA to select rows after Pivot Table



JimS
04-01-2011, 09:41 AM
Does anyone have any idea on how to select a Range for rows begin with the first row after the last row of a Pivot Table using VBA.

The Pivot Table changes size (rows) dependng on the data points and I need to select and range of rows automatically. The range would end at row 2000; getting the starting row is what I need the VBA to do.

Also, the Pivot Table does not start in Row 1 or Column 1, it's down and over a few rows and columns, if that's important.

Thanks for any help...

JimS

Paul_Hossler
04-01-2011, 05:44 PM
Try this, or at least it might give you some ideas


With ActiveSheet.PivotTables(1).TableRange1
MsgBox .Cells(.Rows.Count + 1, 1).Address
End With


Paul

JimS
04-01-2011, 06:45 PM
Thanks Paul...