View Single Post
  #1   Report Post  
uclawarren
 
Posts: n/a
Default Pivot Table VBA code to move a row


I have a pivot table, and within the row field, I would be able to write
a macro to move a certain row to the bottom, regardless of the number of
rows. Currently, if I move the row to the bottom while recording the
macro, it will list the position number, such as

ActiveSheet.PivotTables("PivotTable2").PivotFields ("Carrier").PivotItems(
_
"Other").Position = 8

I found that I will not get the result I want unless there are exactly
8 items in the row section. Does anyone know if there is a way to make
sure that it moves to the "Last" position?

Thanks


--
uclawarren
------------------------------------------------------------------------
uclawarren's Profile: http://www.excelforum.com/member.php...o&userid=27979
View this thread: http://www.excelforum.com/showthread...hreadid=474863