Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi! I am using vba to create pivot table via ADO using data from access db Here is my data field objMyPivotTable.PivotFields("Salary").Orientation xlDataField If I would like my data field has the format of "#, ##0" - that mean no decimal, I am not sure how should I do that? Please advise. Aijun -- Ai_Jun_Zhan ----------------------------------------------------------------------- Ai_Jun_Zhang's Profile: http://www.excelforum.com/member.php...fo&userid=2547 View this thread: http://www.excelforum.com/showthread.php?threadid=47007 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Have you tried:
objMyPivotTable.PivotFields("Salary").NumberFormat = "#,##0" Regards Rowan Ai_Jun_Zhang wrote: Hi! I am using vba to create pivot table via ADO using data from access db. Here is my data field objMyPivotTable.PivotFields("Salary").Orientation = xlDataField If I would like my data field has the format of "#, ##0" - that means no decimal, I am not sure how should I do that? Please advise. Aijun. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi! Rowan, I tried that and it did not work. Thanks, Aijun. -- Ai_Jun_Zhang ------------------------------------------------------------------------ Ai_Jun_Zhang's Profile: http://www.excelforum.com/member.php...o&userid=25474 View this thread: http://www.excelforum.com/showthread...hreadid=470074 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi! Rowan, I figured it out. It has to add "sum of" before the Salary objMyPivotTable.PivotFields("sum of " + "Salary").NumberFormat = "#,##0" Thanks, Aijun. -- Ai_Jun_Zhang ------------------------------------------------------------------------ Ai_Jun_Zhang's Profile: http://www.excelforum.com/member.php...o&userid=25474 View this thread: http://www.excelforum.com/showthread...hreadid=470074 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Pivot 2007. Format row field | Excel Discussion (Misc queries) | |||
Pivot Field in Field List but Not Source Data | Excel Discussion (Misc queries) | |||
Missing Pivot Data in Pivot Field (PF)-Weird! | Excel Discussion (Misc queries) | |||
Pivot Table Row Field Format (OLAP Source) | Excel Discussion (Misc queries) | |||
determine cell is part of pivot item or pivot field | Excel Programming |