Format number in Excel pivottables

When I work with pivottables in Excel and updates or changes the facts/measure I typically have to change the numberformat to show no decimals I have made this small macro to do via a shortcut key or just run the macro when you a selected a value cell in the pivottable..

Sub FormatAsNumber()
    If IsObject(ActiveCell.PivotCell) Then
        ActiveCell.PivotCell.PivotField.NumberFormat = “#,##0”
    End If
End Sub

Add it to your personal workbook and add a short cut key to the macro and you are good to go :-)..

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s