A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
As others have said, sumif or SumifS is the way to do it via formulas. If you are new to the world of these formulas, then concentrate on the ones ending in S (the SumifS, AerageIfS formulas). A limitation of the old Sumif formula was that you could only use a single criteria eg total sales by product. Sumifs allow for lots of criteria so Total sales by product, by region, by town an by day etc. A pivot will give you a more dynamic result, coping well if new items appear in the criteria fields but pivots can grow in size on the screen, especially if a criteria has a lot of items in it.