Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I'm trying to incorporate a pivot table creation in a macro, but can't get
around the specific name of the sheet it's identifying. For instance, the code states '1205 Aging' as the sheet name in the code. Obviously this would be different each month so the macro wouldn't be 'universal'. Any ideas? Thanks. |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
If the macro will be run from the sheet containing the data, you can replace
the SourceData portion of the code to reference the ActiveSheet, rather than using a fixed sheet name. For example, change SourceData:="Sheet1!R1C1:R5C2" to SourceData:=ActiveSheet.Name & "!R1C1:R5C2" --Bruce "Corey" wrote: I'm trying to incorporate a pivot table creation in a macro, but can't get around the specific name of the sheet it's identifying. For instance, the code states '1205 Aging' as the sheet name in the code. Obviously this would be different each month so the macro wouldn't be 'universal'. Any ideas? Thanks. |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks! That worked fine.
"bpeltzer" wrote: If the macro will be run from the sheet containing the data, you can replace the SourceData portion of the code to reference the ActiveSheet, rather than using a fixed sheet name. For example, change SourceData:="Sheet1!R1C1:R5C2" to SourceData:=ActiveSheet.Name & "!R1C1:R5C2" --Bruce "Corey" wrote: I'm trying to incorporate a pivot table creation in a macro, but can't get around the specific name of the sheet it's identifying. For instance, the code states '1205 Aging' as the sheet name in the code. Obviously this would be different each month so the macro wouldn't be 'universal'. Any ideas? Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
pivot table created from another pivot table | Excel Worksheet Functions | |||
Pivot Table - Multiple consolidation Range | Excel Worksheet Functions | |||
Pivot table, dynamic data formula | Excel Discussion (Misc queries) | |||
pivot table | Excel Discussion (Misc queries) | |||
Problem with Pivot Table Drop-Down Menus | Excel Worksheet Functions |