David A. answered 06/08/19
Practicing Statistician and Data Analyst
It sounds like you are looking for Pivot Tables. That feature is available in Google Sheets, and works similarly to Pivot Tables in Excel. If you've never used pivot tables, I'd recommend starting from the Google help page at https://support.google.com/docs/answer/1272900?co=GENIE.Platform%3DDesktop&hl=en