Jumlahkan sel dalam rentang yang memenuhi kriteria
=SUMIF(range, criteria, [sum_range])
| Parameter | Deskripsi |
|---|---|
range |
Range to apply criteria to. |
criteria |
Criteria to apply. |
sum_range |
[optional] Range to sum. If omitted, cells in range are summed. |
The generic syntax for SUMIF looks like this:
=SUMIF(range,criteria,[sum_range])
The criteria is applied to cells in the range. When cells meet the criteria, corresponding cells in the sum_range are summed. The sum_range is optiona
=SUMIF(B5:B14,"jim",D5:D14) // sum sales by Jim
=SUMIF(C5:C14,"ca",D5:D14) // sum sales in CA
=SUMIF(D5:D14,">100") // sum sales over 100
A great way to use SUMIF is to put criteria in another cell and then refer to this cell inside your formula. This makes it easy to change criteria lat
=SUMIF(range,A1)
If you want to include an operator in the criteria, you will need to concatenate the cell reference to the operator. For example, to sum cells in a ra
=SUMIF(range,">"&A1)
Note we are joining the ">" operator to cell A1 with an ampersand (&) character. In the worksheet below, SUMIF has been configured to return the sum o
=SUMIF(D5:D9,">"&G4) // sum if greater than G4
=SUMIF(B5:B9,"<>red",C5:C9) // not equal to "red"
=SUMIF(B5:B9,"<>blue",C5:C9) // not equal to "blue"
=SUMIF(B5:B9,"<>"&E7,C5:C9) // not equal to E7