pivot table
The UK's Number 1 for Microsoft Office Training Add this page to your favourites/bookmarksBookmark page
 
View printable version of pagePrintable version
Plus One Google
Customer: Sign in
Delegate: Sign in
Trainer: Log in

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Pivot Table

Pivot Table

resolvedResolved · Low Priority · Version 2007

replyReply Tue 31 Mar 2009, 16:38Delegate Sandip said...

Sandip has attended:
Excel VBA Intro Intermediate course

Pivot Table

How do you format the cells for Pivot Tables when running a report

For upcoming training course dates see: Pricing & availability

replyReply Thu 9 Apr 2009, 09:49Trainer Carlos said...

RE: Pivot Table

Hi Sandip

To format a pivot table's data you need to decide which format to use, then you write the following code:


Sheets("The Sheet").PivotTables("MyPivotTable").DataBodyRange.NumberFormat = "$#,##0"

If you want to group the row values you could also do the following (In this example there are dates in the row area):

Range("A4").Select
Selection.Group Start:=True, End:=True, Periods:=Array(False, False, False, _
False, True, False, False)

Regards

Carlos

 

Please browse our web site to find out more about
excel-training-course and other Microsoft training courses.

Excel tip:

Quickly Adding New Worksheets

Want to place a new Excel worksheet before current worksheet. Use keystroke SHIFT+F11

View all Excel hints and tips


Microsoft Certified Partner Accredited Training Provider: Institute of IT Training Institute of Leadership and Management - Certified Courses Security Seal verified by visa, mastercard securecard