The SUMIF function is one of the most useful functions in Numbers. You can use it to calculate the total for each category when you have a list of numbers and categories. The best way to use it is to create a second table and use one column in that table as the comparison value.
Want to know more about how to use Numbers on your Mac? Check out this MacMost course!