Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Anyone,
I need to assign a name to one of my pivot table columns (The column will move as users change the page items and such) so I need excel to find the column figure out the length and assign it a name so that I can use the name in other functions (conditional formatting) Here is what I thought would work: Worksheets("PSA_Tool").Names.Add _ Name:="Doug1", RefersTo:= _ Worksheets("PSA_Tool").PivotTables("Main").PivotSe lect "'Lon Prem Bookings Vs Target'", _ xlDataOnly I get an error telling me it expects end of statement. Here are the two statements which do work but do not assign a name like I wanted to: Worksheets("PSA_Tool").PivotTables("Main").PivotSe lect "'Lon Prem Bookings Vs Target'", _ xlDataOnly Worksheets("PSA_Tool").Names.Add Name:="Doug1", RefersTo:=ActiveArea (Active area gives me a #NA under names) Any ideas? Doug |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Debra,
PERFECT! Thanks so much :) Doug |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You're welcome! Thanks for letting me know that it worked.
wrote: Debra, PERFECT! Thanks so much :) Doug -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech.html |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro on a Pivot Table | Excel Discussion (Misc queries) | |||
Pivot table macro | Excel Discussion (Misc queries) | |||
pivot table macro | New Users to Excel | |||
Macro and Pivot Table | Excel Programming | |||
Steps from Macro recorder for Pivot table will not run as a Macro | Excel Programming |