LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default pivot table

It seems odd that you are using "f" as the index into your sheet names and
using "i" as the index into an array of row numbers and an offset to a range
reference to get a column number. I suspect that "f" and "i" may not be
coordinated and may be the source of your problem. Also, does rngUnderCost
ever change? Even if it does, rngUnderCost(i).Column should always return
the same column number regardless of i. This doesn't seem inconsistent, but
it seems odd to use a variable for the index if the results are constant.

--
Regards,
Tom Ogilvy



wrote in message
...
hi...

i am creating a pivot table as many times there are sheets
in the workbook. each pivot needs to be created in a new
sheet. i am able to a new sheet. but my pivot is not
geting created ..nor it gives any error.

here is a part of a code:
For i = 1 To totSheets
Set NewSheet = Worksheets.Add
(befo=ActiveWorkbook.Worksheets.Item(1))
NewSheet.Name = "Summary " & arrWkShNames(f)
tmpStr = "Summary " & arrWkShNames(f)
Sheets("Summary " & arrWkShNames(f)).Select
ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatab ase,
SourceData:= _
arrWkShNames(f) & "!R" & rng1.Row & "C1:R" &
arrLRow(i) & "C" & rngUnderCost
(i).Column).CreatePivotTable TableDestination:="[" &
fileSaveName & "]" & tmpStr & "!R3C1", TableName _
:="PivotTable2",
DefaultVersion:=xlPivotTableVersion10
thanks a lot



 
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
how to create pivot table from existing pivot table in excel 2007 Udayraj Dhulekar Excel Discussion (Misc queries) 2 July 8th 13 08:22 PM
Print Pivot Table headers on pages with Pivot Table tsgoose Excel Worksheet Functions 0 December 9th 08 08:14 PM
Filter lines with Pivot table and non pivot table columns Grover Charts and Charting in Excel 4 September 28th 07 03:16 AM
Filter lines containing pivot table and non pivot table data Grover Excel Worksheet Functions 0 September 24th 07 07:20 PM
Help required with setting up a pivot table with the source on sheet1 to have the pivot table created on sheet called "report" Diana[_5_] Excel Programming 0 August 21st 03 10:19 PM


All times are GMT +1. The time now is 09:05 PM.

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

About Us

"It's about Microsoft Excel"