I have a "Gap" column that represents the difference between two other columns. Each Gap has a associated number, 1-5 that is related to one of 3 Categories -- MIX, TODAY, TOMORROW. If we fix one formula, I can fix all the rest. The formula now uses index and match. What I need it to do is Index, count the occurances (of each number assigned (i.e. 1-5) and create an average related to the indexed numbers divided by the occurances. I don't think it does that now as you will see by my sample attached. I think the formula must be different to get the right result.
Copy and paste down to K8.