Sure. I've also just realized a mistake in my original; "Unit" in the first line of code should say "Office".
Office Group Product Sales
1 G P 15
2 H P 25
3 G P 35
1 G Q 27
4 H P 20
5 G P 13
(1) takes the average of all product P lines (so all lines except the product = Q line), which comes out to 36.
(2) takes the average of product P lines for a given office, if only one office is selected.
(3) should take the average sales of product P for the offices in group G when offices 1, 3, or 5 are selected (which is 21), and for the offices in group H when offices 2 or 4 are selected (which is 22.5).
Basically I am showing how the office did relative to the entire company and relative to other similar offices.