Sum by group

This tutorial shows how to sum values by group using an Excel formula, with the SUMIF function

EXCEL FORMULA 1. Sum by group

EXCEL

Hard coded formula
Sum by group
Cell reference formula
Sum by group
=SUMIF($B$5:$B$11,"A",$C$5:$C$11)
=SUMIF($B$9:$B$15,$C$5,$C$9:$C$15)
GENERIC FORMULA

=SUMIF(range,group,sum_range)

ARGUMENTS
range: The range of cells that contain the list of groups that you want to test the criteria against.
group: A group that is used to determine which of the cells, from the specified range, should be summed.
sum_range: The range of cells with values that are associated with the groups that you want to sum from.

GENERIC FORMULA

=SUMIF(range,group,sum_range)

ARGUMENTS
range: The range of cells that contain the list of groups that you want to test the criteria against.
group: A group that is used to determine which of the cells, from the specified range, should be summed.
sum_range: The range of cells with values that are associated with the groups that you want to sum from.

EXPLANATION

This formula uses the SUMIF function to sum values by specific groups.

Click on either the Hard Coded or Cell Reference button to view the formula that has group name directly entered into the formula or referenced to a specific cell.

RELATED TOPICS

Related Topic Description Related Topic and Description
How to sum the time by year and project
How to sum the values by year
How to sum values by week and task
How to rank a number by group

RELATED FUNCTIONS

Related Functions Description Related Functions and Description
The Excel SUMIF function returns the sum of all numbers in a specified range based on a single criteria