Applies ToExcel for Microsoft 365 Excel for Microsoft 365 for Mac Excel for the web

SUMIF adds a range of values that meet specific criteria. For example, to sum only the values larger than 5, use the formula: =SUMIF(B2:B25,">5"). For more info, see SUMIF function.

SUMIF(range, criteria, [sum_range])

Range is the list of values to sum, criteria is the value of the cells to be added, and sum_range (optional)  is a list of cells to actually sum if other than range

Example 1: Total values within A1 and A4 if they are greater than 100:=SUMIF(A1:A4,">100")

Example 2: Total values within B1 and B4 if text starting with a Y is in column A:=SUMIF(A1:A4,"Y*",B1:B4)

Tip: Want to total based on multiple conditions? See SUMIFS.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.