SUMIF column of same row

Let’s say I have a table of what I have bought this last month.

The table has various products and Category in C column and Quantity in E column. How do I sum everything belonging to a certain category? For example I want how many products in category Food I have bought. In other words food_total = SUM(col_E)IF(col_C == "Food").

SUMIF syntax is SUMIF(Range; Criteria; SumRange) where Range is the set of cells containing the value to search for, Criteria is the value you are searching and SumRange is the set of cell containing the values to sum where the criteria is met. Hence you need something like

=SUMIF(C1:C50, "Food",E1:E50)

Alter the ranges to match your data.

If this answer helped you, please accept it by clicking the check mark :heavy_check_mark: to the left and, karma permitting, upvote it. If this resolves your problem, close the question, that will help other people with the same question.