The easy way will be to:

1) create list of unique customers (say in column M, starting M2) - either with built in tools - remove duplicates or advanced filter or formula (see for instance

http://www.mrexcel.com/forum/excel-questions/439486-extracting-unique-values-list-using-formula.html)

2) in N2 formula (and copy down):

3) in E2 formula (also copy down):

Code:

`=LARGE($N$2:$N$10,ROW(A1))`

4) in D2 (and down):

Code:

`=INDEX($M$2:$M$10,MATCH(E2,$N$2:$N$10,0))`

adjust last row ($10) in the formulas above to be greater than expected number of unique customers

The more advanced would be with packing it all into large array formula, but it would be probably not only more complicated, but also less effective and would slow down your spreadsheet.