pivot table

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

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

Pivot Table

resolvedResolved · Low Priority · Version 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:

Importing Numbers in Excel 2010

Occasionally, when importing data into Excel you find that the some of the imported values are treated as text.

To convert these numbers to actual values, click on an empty cell and press Ctrl+C.

Next, select the range that contains the values you need to change and in the Clipboard Group on the Home tab, click the Paste drop-down arrow and choose Paste Special. In the Paste Special dialog box, select Add and then click OK.

View all Excel hints and tips


Server loaded in 0.08 secs.