I need a little help with macro that can sort the data in the below pivot table.
I have a macro that copies Excel ranges from a few spreadsheets, then pastes the data into destination workbooks and updates multiple pivot tables.
Each time when I change a filter to the new month in the below pivot table, everything is sorted in the alphabetical order. As I need to change a filter on a monthly basis, I would like to ensure that the data is in the required order in this specific pivot table.
I would like to sort the pivot table by values in descending order but always only in the 4th column (for the last month - in this case for October). It needs to be done for both - countries and cities.
Original Pivot Table:
Required order of the pivot table:
I tried to record the macro but no success.

