Recently I was asked how many customers made up 25% of my sales. I listed each customer and their sales for a specified period, then sorted descending on sales.
The formula in C2 is copied down for as far as the data goes. The secret is in the referencing.
In the denominator, both B2 and B51 have dollar signs in both positions. They are absolute references and they will not change if the formula is copied to another cell. That’s also true of the first B2 in the numerator. The second B2, however, is relative and will change. By the time the formula is filled down to row 10, it looks like this:
I can use the same formula for all of column C by making some references absolute and some relative.