A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Enter below formula in cell C7 and copy to the right:
=SUMPRODUCT(--(LOOKUP(MATCH($B$9:$B$13,$A$4:$A$5,0),ROW($B$4:$H$5)-ROW($B$4)+1,B$4:B$5)=C$9:C$13))
This returns the TOTAL count per Q ie. separate for Q1, Q2, ... Q7.
Regards,
Amit Tandon