Use the SUMIF function to sum the values in a range that meet criteria that you specify.
-
Select a cell.
-
Type =SUMIF(.
-
Click and drag the cells you to analyze.
-
Enter the category you want to find.
-
Click and drag the cells for the range.
-
Press Enter.
Source: Microsoft