'How to sort by sections two columns as due date and code?

I currently have the following table:

enter image description here

How can I sort the 1st table by Due date and then by customer code, keeping the colors of each customer code always together. The goal will be to have the listing of each customer organized by due date from oldest to newest.

enter image description here

I tried by Excel menu (Sort and filter--> personalized sort), but this way didn't function. Is it possible by other way? For example, vba code or by excel funtions?



Solution 1:[1]

The only answer without vba that i know of using sort with 2 level. You Will just click on Sort in data tab then press on +add level button first sort should be due date and then the second one should be customer code enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 abdullah