How to use SUMIF in Excel to add values by category

SUMIF adds up only the numbers that match a rule you set, so you can total sales by region, expenses by type or hours by person without sorting anything. It suits anyone who keeps lists in Excel and wants quick totals. You just need a sheet with a label column and a number column.

YouTube video: How to Use SUMIF in Excel- Formula That Adds Only What You Want

YouTube’s video details do not confirm captions. Check CC in the player for available tracks.

Video length
3 min 31 s
Time to do it
10 minutes
Difficulty
Easy
Steps
8

What you need

Steps

  1. Click the cell where you want the total to appear, for example an empty cell beside your category list.

  2. Type =SUMIF( to start the formula. Excel will show a hint listing the three parts it expects.

  3. Select the range you want to check, such as B2:B100, then type a comma. This is the column holding your categories.

  4. Type the criteria in double quotes, like "North" or ">100", then a comma. Text and operators need the quotes, plain numbers do not.

  5. Select the range holding the numbers to add, such as D2:D100, close the bracket and press Enter.

  6. Check the result against a quick filter of the same category to make sure the ranges line up.

  7. To copy the formula down a list of categories, lock both ranges with dollar signs first, like $B$2:$B$100 and $D$2:$D$100.

  8. Point the criteria at a cell instead of typed text, like =SUMIF($B$2:$B$100,E2,$D$2:$D$100), so each row totals its own category.

Tips and common mistakes

Both ranges must be the same size or the totals will be wrong, so keep them on matching rows.

Use wildcards for partial matches, for example "*coffee*" adds every row containing that word.

If you get 0, check for stray spaces in the category text and make sure the criteria quotes are straight, not curly.

For two or more conditions, switch to SUMIFS, which takes extra range and criteria pairs.

Questions

What is the difference between SUMIF and SUMIFS?

SUMIF handles one condition. SUMIFS takes multiple range and criteria pairs, so use it when you need to match a category and a date at the same time.

Why does my SUMIF formula return 0?

Usually the criteria text does not match exactly, because of extra spaces, different capitalisation of numbers stored as text, or ranges of different sizes. Clean the text or retype the criteria.

Can I use SUMIF with dates?

Yes. Put the date rule in quotes, such as ">="&DATE(2026,1,1), and select your date column as the range.

The notes are drafted automatically from video details and general task knowledge. How the guide was prepared

Report a correction

More in Money & Office

See all