The worksheet shown contains two different approaches.
In the range F5:G8, we have created a summary table to summarize counts by color.
The article below explains both approaches.
Note: both formulas below usefull column references(e.g.
B:B, C:C).
The solution relies on theSUMIF function.
the cell above).
If the two values match, we return anempty string("").
Note: this formula depends on data being sorted by group to make it get sensible results.
One advantage of the summary table approach is that the sort order doesn’t matter.
However, be aware that full column references can cause severe performance problems in specific circumstances.
Why about Pivot Tables?
Pivot tablesremain an excellent way togroup and summarize data.
Criteria can be applied to dates, numbers, and text.
More than one condition can be tested by nesting IF functions.