Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Corey
 
Posts: n/a
Default Record Pivot Table Macro

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   Report Post  
Posted to microsoft.public.excel.misc
bpeltzer
 
Posts: n/a
Default Record Pivot Table Macro

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   Report Post  
Posted to microsoft.public.excel.misc
Corey
 
Posts: n/a
Default Record Pivot Table Macro

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
pivot table created from another pivot table Kreed Excel Worksheet Functions 6 October 26th 05 04:16 PM
Pivot Table - Multiple consolidation Range tengreen Excel Worksheet Functions 1 July 1st 05 07:18 PM
Pivot table, dynamic data formula Excel GuRu Excel Discussion (Misc queries) 3 May 3rd 05 10:45 PM
pivot table YingRui Oliviero Excel Discussion (Misc queries) 1 April 12th 05 12:57 PM
Problem with Pivot Table Drop-Down Menus Mac Excel Worksheet Functions 4 November 7th 04 01:18 PM


All times are GMT +1. The time now is 04:59 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"