# SUMIF

## 使用範本

`SUMIF(A1:A10,">20")`

`SUMIF(A1:A10,"Paid",B1:B10)`

## 語法

`SUMIF(range, criterion, [sum_range])`

• ``` 範圍 ``` 系統會對這個範圍測試是否符合「條件」。 ``` 條件 ```.

• ``` 條件 ``` 要套用到「範圍」的模式或測試。 ``` 範圍 ```.

• IF``` 範圍 ``` contains text to check against, ``` 條件 ``` must be a 字串 ``` 條件 ``` can contain wildcards including `?` to match any single character or `*` to match zero or more contiguous 個字元To match an actual question mark or asterisk, prefix the character with the tilde (`~`) character (i.e. `~?``~*`). A string criterion must be enclosed in quotation marks. Each cell in ``` 範圍 ``` is then checked against ``` 條件 ``` for equality (or match, if wildcards are used).

• IF``` 範圍 ``` contains numbers to check against, ``` 條件 ``` may be either a string or a number. If a number is provided, each cell 特別要注意``` 範圍 ``` is checked for equality with ``` 條件 ```. 如果您不想這麼做...``` 條件 ``` may be a string containing a number (which also checks for equality), or a number prefixed with any of the following operators: `=` (checks for equality), `>` (checks that the range cell value is greater than the criterion value), or `<` (checks that the range cell value is less than the criterion value)

• ``` 加總範圍 ``` 如果與「範圍」引數不同，則代表要加總的範圍。 ``` 範圍 ```.

## 附註

• `SUMIF` can only perform conditional sums with a single 條件 To use multiple criteria, use the database function `DSUM`.

## 另請參閱

`SUMSQ`: 傳回一連串數字或儲存格平方的總和。

`SUM`: 傳回一連串數字和/或儲存格的總和。

`SERIESSUM`: 提供參數 `x``n``m`以及`a`，則傳回 a1xn + a2x(n+m) + ... + aix(n+(i-1)m) 的冪級數總和。i 代表「a」範圍內的項數。

`QUOTIENT`: 傳回某個數字除以另一個數字的結果 (不包含餘數)。

`PRODUCT`: 傳回一連串數字相乘的結果。

`MULTIPLY`: 傳回兩個數字的乘積，等於「*」運算子。

`MINUS`: 傳回兩個數字的差，等於「-」運算子。

`DSUM`: 利用 SQL 型查詢功能在資料庫資料表形式的陣列或範圍中選取值，然後傳回各值的總和。

`DIVIDE`: 傳回一個數字被另一個數字相除的結果。等於「/」運算子。

`COUNTIF`: 傳回範圍內符合條件的項目數量。

`ADD`: 傳回兩個數字的總和， 等於「+」運算子。