Hi!

I have an an excel sheet containing data in a sort of 'hierarchical' form.
Basically this is Energy consumption data for various zones; these are first split into different clusters, which are further split into Zones, some of which are also split into Sub-Zones.

For Example:
Cluster A---Average Value for Cluster A :10
---Zone A1 :9
---Zone A2 :10.5
------->Sub-Zone A2.1 :7
------->Sub-Zone A2.2 :12
---Zone A3 :9.5

Cluster B---Average Value for Cluster B :14
---Zone B1 :16
---Zone B2 :11.5
------->Sub-Zone B2.1 :10
------->Sub-Zone B2.2 :14
---Zone B3 :15

This is a fairly large list containing 100-200 entries. My goal here is to sort this data in a descending order while keeping the hierarchical order, in order to see areas with highest consumption.
So the Cluster with the highest average would be on top, with all the zones contained in the cluster being then sorted similarly in a descending order, and any Sub-zones within the zones being also sorted in a descending order (while still being listed under their parent zone, which is sorted and listed under the parent cluster).

Basically I first want to sort the Clusters in descending order of consumption as if they were single entries, then within each sorted Cluster 'group' I essentially want to run a second sorting, this time sorting the Zones in descending order (while keeping the parent clusters sorted as in the initial sorting), and similarly a third sorting for any sub-zones.

The given example would thus be as follows:

Cluster B---Average Value for Cluster B :14
---Zone B1 :16
---Zone B3 :15
---Zone B2 :11.5
------->Sub-Zone B2.2 :14
------->Sub-Zone B2.1 :10


Cluster A---Average Value for Cluster A :10
---Zone A2 :10.5
------->Sub-Zone A2.2 :12
------->Sub-Zone A2.1 :7
---Zone A3 :9.5
---Zone A1 :9

Is there any way that this can be achieved? I have been trying to find a good way to do this for the past hour, but I can't really come up with anything.
I might have to experiment a bit with a custom VBA macro, but I've been avoiding that as I only know the very basics heh.