Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Pivottable
I am trying to sort my data first and then refresh pivot tables using the
following macro, Private Sub Worksheet_Change(ByVal Target As Range) Range("Data1").Sort Key1:=Range("P18"), Order1:=xlAscending, Header:=xlYes, _ OrderCustom:=10, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal ActiveWorkbook.RefreshAll End Sub The problem is that the pivottables are not refreshing correctly. Is the reason due to the fact that the data being sorted has not completed when the pivot starts to refresh? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Pivottable data field | Excel Discussion (Misc queries) | |||
Sorting in PivotTable | Excel Discussion (Misc queries) | |||
Pivottable Dates | Excel Discussion (Misc queries) | |||
PivotTable canned functions | Excel Discussion (Misc queries) | |||
How do I set permanent secondary axis in PivotTable chart? | Charts and Charting in Excel |