close

I have a dynamic range of data that I pivot (multiple consolidation range)
using a macro.

the next step is to double click on the intersection of grand totals - this
allows me to get the desired lay out.

Problem: As my range is dynamic this quot;cellquot; isn't constant. I need a macro
that automatically pics up the bottom right corner of a pivot table.
Here is the layout of the pivot table - the cell in question is the one with
quot;13quot; in it.Count of ValueColumn
Rowbasic commissionovertimeGrand Total
11113
2112
3112
411
5112
61113
Grand Total63413Chris,

Change the A5 to be the cell where you are placing the pivot table

Dim myR As Range
Set myR = Range(quot;A5quot;).CurrentRegion
Set myR = myR(myR.Cells.Count)
MsgBox myR.Address amp; quot; is the last cell of the pivot table.quot;

HTH,
Bernie
MS Excel MVPquot;Chrisquot; gt; wrote in message
...
gt;I have a dynamic range of data that I pivot (multiple consolidation range)
gt; using a macro.
gt;
gt; the next step is to double click on the intersection of grand totals - this
gt; allows me to get the desired lay out.
gt;
gt; Problem: As my range is dynamic this quot;cellquot; isn't constant. I need a macro
gt; that automatically pics up the bottom right corner of a pivot table.
gt; Here is the layout of the pivot table - the cell in question is the one with
gt; quot;13quot; in it.
gt;
gt;
gt; Count of Value Column
gt; Row basic commission overtime Grand Total
gt; 1 1 1 1 3
gt; 2 1 1 2
gt; 3 1 1 2
gt; 4 1 1
gt; 5 1 1 2
gt; 6 1 1 1 3
gt; Grand Total 6 3 4 13
gt;

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()