Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 97 & Pivot Table
Hi There I have a couple of problems working with with Excel 97 & pivottables. 1). I am trying to rename a couple of datafields where Excel i creating field names such as 'Sum of Breach' & 'Count of Call_Ref' wish to rename them. I have tried code such as Set myField = myPivot.PivotFields("Breach") then myfield.name = "NewName" but the value appears to be read-only. 2). I am trying to create a Calculatedfield using code such as Set slafield = myPivot.CalculatedFields.Add("SLA", "(=x)"). I can fin little or no info on how to set the formula part of the Calculate field. Any help would be appreciate ----------------------------------------------- ~~ Message posted from http://www.ExcelTip.com ~~View and post usenet messages directly from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 97 & Pivot Table
Well my problem now boils down to summing 2 calculatedfields. I have field1 which is a count of one set of values, field2 which is sum of another field now I wish to create a new calculatedfield whic manipulates field1 and Field2 ie :- Set slafield = myPivot.CalculatedFields.Add("SLA", "=(Field1 Field2)") But it doesn't appear that you can do this with calculated fields, ha anybody any idea how I can do this ? ----------------------------------------------- ~~ Message posted from http://www.ExcelTip.com ~~View and post usenet messages directly from http://www.ExcelForum.com |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 97 & Pivot Table
You can add a column (e.g. MyCount) to the data, and enter a 1 in each
row. In your calculated field, change the formula to MyCount+Field2, and you should get the correct total. pilmart wrote: Well my problem now boils down to summing 2 calculatedfields. I have field1 which is a count of one set of values, field2 which is a sum of another field now I wish to create a new calculatedfield which manipulates field1 and Field2 ie :- Set slafield = myPivot.CalculatedFields.Add("SLA", "=(Field1 + Field2)") But it doesn't appear that you can do this with calculated fields, has anybody any idea how I can do this ?? -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech.html |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel 97 & Pivot Table
Many Many thanks, this was exactly what I was looking for
and has solved my problem. Blindingly obvious when you think about it really. Once again thankyou -----Original Message----- You can add a column (e.g. MyCount) to the data, and enter a 1 in each row. In your calculated field, change the formula to MyCount+Field2, and you should get the correct total. pilmart wrote: Well my problem now boils down to summing 2 calculatedfields. I have field1 which is a count of one set of values, field2 which is a sum of another field now I wish to create a new calculatedfield which manipulates field1 and Field2 ie :- Set slafield = myPivot.CalculatedFields.Add("SLA", "= (Field1 + Field2)") But it doesn't appear that you can do this with calculated fields, has anybody any idea how I can do this ?? -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech.html . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to create pivot table from existing pivot table in excel 2007 | Excel Discussion (Misc queries) | |||
Export Pivot Table Data to Excel Table | Excel Discussion (Misc queries) | |||
Excel Pivot Table Plugin? (crosstab to data table) | Excel Discussion (Misc queries) | |||
Can links between Excel 2003 Pivot Charts and their pivot table b. | Charts and Charting in Excel | |||
MS Excel - How can I summarize a table? Will Pivot Table Reports do this for me? | Excel Programming |