This is my code so far :-
pivotlastrow = Range("U65536").End(xlUp).Row ' select pivot table last row
lastcol = Range("iv8").End(xlToLeft).Column ' select pivot table last column
TOTPT = Range(lastcol & pivotlastrow)
I am attempting to locate the cell in the bottom right corner of my Pivot Table, which holds the Total Value. The location varies each time I run the Pivot Table as the amount of data contained in the table varies.
"lastcol" in my code returns 44 now, but I need it to return the column character reference - how do I do that?
Thanks, all help is appreciated
Alternatively how do I locate the cell in some other way?
pivotlastrow = Range("U65536").End(xlUp).Row ' select pivot table last row
lastcol = Range("iv8").End(xlToLeft).Column ' select pivot table last column
TOTPT = Range(lastcol & pivotlastrow)
I am attempting to locate the cell in the bottom right corner of my Pivot Table, which holds the Total Value. The location varies each time I run the Pivot Table as the amount of data contained in the table varies.
"lastcol" in my code returns 44 now, but I need it to return the column character reference - how do I do that?
Thanks, all help is appreciated
Alternatively how do I locate the cell in some other way?