How do I type a formula to calculate an items percent of the subtotal sales amount?

For example:

Widget A

Customer 1 - 100 units = 29% of sales
Customer 2 - 50 units = 14% of sales
Customer 3 - 200 units = 57% of sales
TOTAL UNITS = 350 <--- Found by using Excel Subtotals

Same thing for Widget B through Z

I've got hundreds of different products being bought by several different customers. I can't write a formula for each item, so I was thinking there must be a way to tell the formula I want to divide each component amount by it's "parent" subtotal amount.