Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 53
Default Pivottables change datatype in vba

But how do change the datatype from default xlCount to xlSum using vba code?
I have trying to slot it into the With End With is that possible?

With .PivotFields("venue")
.Orientation = xlRowField
.Position = 1
End With

TIA
johnb
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,886
Default Pivottables change datatype in vba

Hi John

If Venue is a Row field, then you cannot use Count or Sum. You can only
apply it to Data fields.

Maybe

With ActiveSheet.PivotTables("PivotTable1").PivotFields ("Count of
Venue")
..Function = xlSum
End With

Obvioulsy change PivotTable1 to the number relevant for your sheet.
--
Regards

Roger Govier


"johnb" wrote in message
...
But how do change the datatype from default xlCount to xlSum using vba
code?
I have trying to slot it into the With End With is that possible?

With .PivotFields("venue")
.Orientation = xlRowField
.Position = 1
End With

TIA
johnb



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 53
Default Pivottables change datatype in vba

Cheers Roger

johnb

"Roger Govier" wrote:

Hi John

If Venue is a Row field, then you cannot use Count or Sum. You can only
apply it to Data fields.

Maybe

With ActiveSheet.PivotTables("PivotTable1").PivotFields ("Count of
Venue")
..Function = xlSum
End With

Obvioulsy change PivotTable1 to the number relevant for your sheet.
--
Regards

Roger Govier


"johnb" wrote in message
...
But how do change the datatype from default xlCount to xlSum using vba
code?
I have trying to slot it into the With End With is that possible?

With .PivotFields("venue")
.Orientation = xlRowField
.Position = 1
End With

TIA
johnb




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
DateTime datatype in VBA Alex Excel Programming 4 January 30th 07 06:36 PM
DataType Property Access101 Excel Programming 3 August 25th 05 08:15 PM
need help- SUB: DATATYPE FOR A CELL.. monika Excel Programming 1 February 13th 04 02:13 PM
DataType Conversion AsimKhaliq Excel Programming 0 January 21st 04 12:40 AM
How do I change the datatype of a cell? Casper Hornstrup Excel Programming 5 December 10th 03 01:46 PM


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