Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Can someone please help me.
I'm trying to write a script which will go to adjacent cells in row 6 of a PivotTable and replace the existing text with text located in adjacent cells in a row at another location. I can achieve this with the following code: Range("B5").Select ActiveSheet.PivotTables ("PivotTable1").PivotFields("Date").PivotItems_ ("4/12/2005 - 10/12/2005").Caption = "10/12/05" Range("C5").Select ActiveSheet.PivotTables ("PivotTable1").PivotFields("Date").PivotItems_("1 1/12/2005 - 17/12/2005").Caption = "17/12/05" Range("C5").Select ActiveSheet.PivotTables ("PivotTable1").PivotFields("Date").PivotItems_("1 8/12/2005 - 24/12/2005").Caption = "24/12/05" However, I want to write this more efficiently using code which successively increments each column reference in Row 6 and replacing with the text in Row 100, where B100 = 10/12/05, C100 = 17/12/05, D100 = 24/12/05. Can someone kindly help show me how this can be done? Thanks, Simon |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
simple loop macro | Excel Programming | |||
simple loop macro | Excel Programming | |||
simple loop macro | Excel Programming | |||
simple loop macro | Excel Programming | |||
Probably missing something simple in loop macro...Please help | Excel Programming |