ExcelReady
CourseFunction guidesPricing
Plan my prepStart freeStart learning for free
ExcelReady

Be Excel-ready before the interview. Hands-on practice in your browser, with instant feedback.

Learn

  • Course
  • Function guides
  • Plan my prep

Product

  • Pricing
  • Certificate
  • Brand kit

Company

  • Contact
  • Terms
  • Privacy

© 2026 ExcelReady. All rights reserved.

Function guides / SUMIF

The SUMIF function in Excel

SUMIF adds the numbers in one column for the rows that match a condition in another, like total travel expenses or revenue for one client. It's the quickest way to build a subtotal by category without a pivot table, and a frequent first step in finance and operations tests.

Syntax

=SUMIF(range, criteria, [sum_range])
rangeThe cells to test against the condition, like a category column.
criteriaThe condition, like "Travel", ">100", or "<>"&F2.
sum_rangeOptional. The cells to add. If left out, SUMIF adds the cells in range itself, which is useful for conditions on the numbers themselves.

Try it yourself

This is a live spreadsheet. Type the formula and press Enter.

In F2, use SUMIF to total the Amount of all invoices whose status is Unpaid.

fx
ABCDEFG
1
Invoice
Client
Amount
Status
Unpaid total
2
INV-2201
Halcyon Spa
1800
Paid
3
INV-2202
Redwood Legal
2450
Unpaid
4
INV-2203
Halcyon Spa
950
Unpaid
5
INV-2204
Marlow Bikes
3100
Paid
6
INV-2205
Redwood Legal
1200
Paid
7
INV-2206
Juniper Clinic
2675
Unpaid
8
9
10

Tip: Test the Status column, and add up the Amount column.

Examples

=SUMIF(B2:B8,"Travel",C2:C8)→ 915

Totals every expense claim in the Travel category.

=SUMIF(A2:A8,"Priya Nair",C2:C8)→ 607

Same idea with a different column as the test: everything Priya claimed.

=SUMIF(C2:C8,">100")→ 1044

No sum_range here, so SUMIF adds the amounts that are themselves over 100.

Example data

1EmployeeCategoryAmount
2Priya NairTravel420
3Tom AveryMeals64
4Priya NairSoftware129
5Lena FoxTravel310
6Tom AveryTravel185
7Lena FoxMeals47
8Priya NairMeals58

Common mistakes

  • Mixing up the order with SUMIFS

    In SUMIF the cells to add come last. In SUMIFS they come first. If your total looks wrong after switching functions, check the argument order.

  • Ranges that don't line up

    SUMIF(B2:B8,"Travel",C3:C9) doesn't error, it just adds the row below each match. Start both ranges on the same row.

  • Leaving out sum_range by accident

    Without the third argument, SUMIF tries to add the category column, which is text, so you get 0. Add the amount column as sum_range.

FAQ

What's the difference between SUMIF and SUMIFS?+

SUMIF handles one condition. SUMIFS handles one or more, and puts the sum range first. Many people use SUMIFS for everything so they only remember one argument order.

Can SUMIF use multiple criteria?+

Not in one formula. Use SUMIFS for AND logic, or add two SUMIFs together for OR logic.

How do I sum if a cell contains certain text?+

Use wildcards: =SUMIF(A2:A50,"*north*",C2:C50) adds rows where column A contains "north" anywhere.

Lesson

Master SUMIF step by step: SUMIF

Add up only the numbers that meet a condition, with and without a separate sum range.

Related functions

SUMIFSCOUNTIFSUM