#### Contoh

Pertimbangkan tabel berikut

 A B C Nama Produk Penjualan Pendapatan pensil 20 65 pena 35 85 buku catatan 20 190 buku 17 180 kotak pensil tidak tidak

Dalam semua contoh di bawah ini, rentang untuk perhitungan mengandung baris #6, yang diabaikan karena mengandung teks.

Func_Range; Range1; Criterion[; Range2; Criterion2][; â€¦ ; [Range127; Criterion127]]

Hubungan logis antara kriteria dapat didefinisikan sebagai logika AND (kata hubung). Dengan kata lain, jika dan hanya jika semua kriteria yang diberikan terpenuhi, nilai dari sel yang sesuai dari Func_Range yang diberikan diperhitungkan.

Func_Range dan Range1, Range2 ... harus memiliki ukuran yang sama, jika tidak fungsi mengembalikan err: 502 - Argumen tidak valid.

Range1 â€“ required argument. It is a range of cells, a name of a named range, or a label of a column or a row, to which the corresponding criterion is to be applied.

Criterion: A criterion is a single cell Reference, Number or Text. It is used in comparisons with cell contents.

A reference to an empty cell is interpreted as the numeric value 0.

A matching expression can be:

• A Number or Logical value. A matching cell content equals the Number or Logical value.

• A value beginning with a comparator (<, <=, =, >, >=, <>).

For =, if the value is empty it matches empty cells.

For <>, if the value is empty it matches non-empty cells.

For <>, if the value is not empty it matches any cell content except the value, including empty cells.

Note: "=0" does not match empty cells.

For = and <>, if the value is not empty and can not be interpreted as a Number type or one of its subtypes and the property Search criteria = and <> must apply to whole cells is checked, comparison is against the entire cell contents, if unchecked, comparison is against any subpart of the field that matches the criteria. For = and <>, if the value is not empty and can not be interpreted as a Number type or one of its subtypes applies.

• Other Text value. If the property Search criteria = and <> must apply to whole cells is true, the comparison is against the entire cell contents, if false, comparison is against any subpart of the field that matches the criteria. The expression can contain text, numbers, regular expressions or wildcards (if enabled in calculation options).

Range2 - Opsional. Range2 dan semua yang berikut memiliki arti yang sama dengan Range1.

Criterion2 â€“ Optional. Criterion2 and all the following mean the same as Criterion.

Fungsi ini dapat memiliki hingga 255 argumen, artinya Anda dapat menentukan 127 rentang kriteria dan kriteria untuknya.

Jika sel berisi TRUE, itu diperlakukan sebagai 1, jika sel berisi FALSE - sebagai 0 (nol).

Mohon dukung kami!