I have a worksheet that looks like this:

Date,Name,product,sales
1/1,John,pots,5
1/1,James,pots,2
1/1,John,pans,3
1/2,James,pans,4
1/2,John,pots,1
...

I want to create one table for John and and one for James that looks like this (using John's as an example):

Product,Pots,Pans
Sales,6,3

This is basically a pivot table summing their sales, with Products in each column and sorting it by sales.

I have a sales people, so I hate creating a pivot table for each person. Is there a way to do this using formulas? I can do this using sumifs() but I need help figuring out how to sort them by sales in descending order. It's difficult because I will only chart the top 10 products and ignore the rest.