|
Home > Pivot > Charts > Format Pivot Chart Number FormattingWhen a pivot chart is created in Microsoft Excel, the numbers on the chart's axis are formatted the same as the pivot table's numbers. See how to change the number format in both places, or in just the pivot table. For example, show pivot chart numbers in thousands. |

When you create a pivot chart from a pivot table, the numbers on the chart's axis have the same number format as the pivot table's numbers. This short video shows the steps for changing the pivot chart number format, and there are written steps below the video.
Video Timeline:
When you create a pivot chart from a pivot table, the numbers on the chart's axis have the same number format as the pivot table's numbers. In the screen shot below, the numbers are in General format. There is no comma separator, and no decimals.
Follow the instructions below, to change the formatting in both places, or in just the pivot chart. There is also a sample macro that will change the number formatting for all the pivot charts in the active workbook.

To change the number format in both the Pivot Table and Pivot Chart, follow the steps below.



In some cases, you might want the pivot chart to have a number format that is different from the pivot table. In this example, the pivot chart will get a custom format to show the numbers as thousands, so the numbers take less room.
Follow these steps to change the pivot chart number format, without affecting the pivot table:

Next, follow these steps to set up the new number format for the pivot chart, to replace the default format.


If you've changed the units with number formatting, you might need to adjust the Axis Units too.

To change the number formatting for all the pivot charts in the active workbook, you can use an Excel macro, like the Excel VBA code shown in the next section.
You can test this macro in the sample workbook, where there are two pivot charts, on two different worksheets.

To test this macro, download the sample workbook, unblock the zipped folder, then unzip the folder. Then, follow these steps, to test the macro:

After you run the macro, the axis number format in each chart changes to:

The following Excel macro changes the axis number format for all pivot charts in the workbook.
To use this code in your own Excel files, copy the code, and paste it into a regular code module. Then, follow the steps in the previous section, to run the macro.
Sub FormatChartNums()
Dim ws As Worksheet
Dim pc As ChartObject
Dim strFmt As String
On Error Resume Next
strFmt = "#,##0" ' no decimals
For Each Ws In ActiveWorkbook.Worksheets
For Each PC In ws.ChartObjects
With pc.Chart
'test for pivot charts
If Not .PivotLayout Is Nothing Then
.Axes(xlValue).TickLabels _
.NumberFormat = strFmt
End If
End With
Next PC
Next Ws
End Sub
You can download a copy of the Pivot Chart number formatting sample file, to test the number formatting macro. The zipped file is in xlsm (macro-enabled) format. After you unzip the file and open it, enable macros, so you can use the macros.
Don't miss my monthly Excel newsletter! You'll get quick tips, article links, and a bit of fun. Add your email, and click Sign Up.
Next, when you get my reply, click the Confirm button. I add this step to protect you from spam!
Last updated: July 26, 2026 2:39 PM