On 2002-04-09 15:59, Sam40mUK wrote:
Hello Jay,
Thanks for the swift response.
Basically I am attempting to End Down to the bottom of a list, then move left two cells and paste a Summary.
The list is a product of a Pivot Table and therefore is of variable length .. hence the End Down and variable nature of left two cells, paste.
I hope this clarifies the situation a little.
Regards
S.
Hi,
Range("C2").End(xlDown).Offset(0, -2) = summary value
or
ActiveCell.End(xlDown).Offset(0, -2) = summary value
This requires that this is run with the Active Cell in the correct column.
Not necessarily the best way, though.
Assuming you have only one Pivot Table on the sheet in columns A:E, then you could do something like the following in your code:
-------------
lastrow = Cells(rows.count,"A").end(xlup).row
Cells(lastrow,"Your Column") = Summary
-------------
This finds the last row and places the
summary in the column of your choice. You could also make the column a determined variable as well.
lastcol = Cells(2,256).End(xltoLeft).Column
and reference 2 columns to the left of that
Cells(lastrow + 5, lastcol - 2) = summary val
for example.
HTH,
Jay
This message was edited by Jay Petrulis on 2002-04-09 16:15