Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

pivot table

ResolvedVersion 2007

Sandip has attended:
Excel VBA Intro Intermediate course

Pivot Table

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

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

 

Training courses

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.

Excel tip:

Finding cells that have data restrictions

Click anywhere on the worksheet.
On the Edit menu, click Go To.
Click Special.
Click Data validation.
Click All.

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.09 secs.