LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Pivot Range Name

I have a macro I recorded and am now trying to tweek with VBA to make i
more accurate. In the recorder I got the pivot source from naming
large cell range, some of which I don't need.

Trying to make the source dynamic but first was just trying to "name
the range for the source data to pull from. Here's the pivo
generation statement:

ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatab ase, SourceData:
"R2C1:R2800C26").CreatePivotTable _
TableDestination:="", TableName:="PivotTable4"

Trying to name a range to replace "R2C1:R2816C26", but get an erro
code when it runs. Below is the code to set the range name.

Dim RawData As Range
Set RawData = Range("R2C1:R2800C26")

Get "error 1004, Method 'Range' of object '_Global failed"

What am I doing wrong? TIA Lift Of

--
Message posted from http://www.ExcelForum.com

 
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
Duplicating Pivot Chart / Changing Pivot Chart data range BillG Excel Discussion (Misc queries) 4 February 25th 10 02:15 PM
Pivot table and value range Nicawette Excel Discussion (Misc queries) 2 December 28th 09 09:09 AM
Edit the range of a pivot table Christine Excel Worksheet Functions 4 October 8th 09 06:31 PM
Pivot Table Range Scott R Excel Worksheet Functions 1 September 27th 07 06:56 AM
Dynamic range in Pivot table Wanna Learn Excel Discussion (Misc queries) 4 July 2nd 07 08:08 PM


All times are GMT +1. The time now is 04:07 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"