I am trying to calculate the weighted average of a column that is organized by name. I already successfully calculated the weighted average of a column organized by number using this formula:

=SUMPRODUCT(--(Master!H4:H10002=1),Master!I4:I10002,Master!F4:F10002)/C4

Where

**column H**contains the category by which I want to sort,

**column I**contains the values for which I want to find the weighted average,

**column F**contains the values I am finding the weight of, and column C is a total of all the values I am finding the weight of.

Hopefully that makes sense. Now, instead of sorting by the number "1", I want to sort by name, for instance, "northeast." Any suggestions?