Consulting

Results 1 to 3 of 3

Thread: Solved: Excel VBA to select rows after Pivot Table

  1. #1
    VBAX Mentor
    Joined
    Jan 2009
    Posts
    304
    Location

    Solved: Excel VBA to select rows after Pivot Table

    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

  2. #2
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,730
    Location
    Try this, or at least it might give you some ideas

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

    Paul

  3. #3
    VBAX Mentor
    Joined
    Jan 2009
    Posts
    304
    Location
    Thanks Paul...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •