Home

Pasting Pivot Table as Values... losing Borders and formatting

%3CLINGO-SUB%20id%3D%22lingo-sub-671145%22%20slang%3D%22en-US%22%3EPasting%20Pivot%20Table%20as%20Values...%20losing%20Borders%20and%20formatting%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-671145%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20created%20a%20dashboard%20with%20source%20data%20on%20one%20sheet%20and%20several%20additional%20sheets%2C%20each%20with%20a%20pivot%20table.%20The%20pivot%20tables%20are%20used%20to%20create%20charts%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20added%20a%20macro%20that%20will%20automatically%20update%20the%20pivot%20table%20when%20I%20add%20data.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPrivate%20Sub%20Worksheet_Change(ByVal%20Target%20As%20Range)%3C%2FP%3E%3CP%3EThisWorkbook.RefreshAll%3C%2FP%3E%3CP%3EEnd%20Sub%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhen%20I%20add%20the%20data%2C%20the%20new%20data%20comes%20across%20to%20the%20pivot%20table%2C%20but%20all%20the%20formatting%20is%20lost%2C%20the%20chart%20type%20changes%20and%20the%20horizontal%20axis%2C%20where%20the%20dates%20are%2C%20is%20now%20out%20of%20order.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20just%20trying%20to%20update%20the%20charts%20with%20new%20data.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-671145%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ECharting%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMacros%20and%20VBA%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Anthony Blackburn
New Contributor

I have created a dashboard with source data on one sheet and several additional sheets, each with a pivot table. The pivot tables are used to create charts

 

I added a macro that will automatically update the pivot table when I add data.

 

Private Sub Worksheet_Change(ByVal Target As Range)

ThisWorkbook.RefreshAll

End Sub

 

When I add the data, the new data comes across to the pivot table, but all the formatting is lost, the chart type changes and the horizontal axis, where the dates are, is now out of order.

 

I'm just trying to update the charts with new data.

Related Conversations
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
Tabs and Dark Mode
cjc2112 in Discussions on
30 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
7 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
29 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies