ExcelFormulas logoExcelFormulas.
Chiedi all'IA
Matematica e statisticaVerificato da QA

COUNTIF.

Counts the number of cells within a range that meet a single specified condition or criteria.

Matematica e statistica
ExcelExcel 365Excel 2021Excel 2019Google Sheets

Come funziona nel dettaglio.

COUNTIF è una funzione fondamentale di Excel. Counts the number of cells within a range that meet a single specified condition or criteria. Consente di velocizzare la gestione dei fogli di calcolo, ridurre gli errori e creare report automatizzati professionali.

💡 In parole semplici.

Counts how many cells in a list match a rule you specify, such as counting scores over 75 or orders marked "Yes".

Analogia di tutti i giorni

"Think of COUNTIF like a bouncer at a club checking IDs. It looks down your list and counts only the people who meet your rule (e.g. age 21 or over)."

Sintassi.

Notazione Ufficiale Excel
=COUNTIF(range, criteria)
Consiglio: Gli argomenti tra parentesi quadre [come_questo] sono facoltativi; tutti gli altri sono obbligatori.

Argomenti.

Di seguito l'elenco dettagliato di tutti i parametri accettati da questa funzione.

rangeObbligatorio

The group of cells you want to count.

Valore d'esempio: B2:B6
criteriaObbligatorio

The condition that defines which cells to count. Can be a number, text, expression, or cell reference.

Valore d'esempio: ">=100"

Esempio pratico.

Scenario di utilizzo

Count High-Value Transactions

Count how many transactions in column B are greater than or equal to $100.

CustomerPurchase AmountStatusCriteriaCount Result
Alice150Completed>=100—
Bob85Completed——
Charlie210Pending——
Formula applicata
=COUNTIF(B2:B6, ">=100")
Risultato atteso::3

Evaluates COUNTIF over the sample table cells, placing the verified output in cell E2.

Generatore di formula.

Apri Procedura Guidata Completa

Compila i campi qui sotto per creare una formula personalizzata pronta da incollare nel tuo foglio di calcolo.

Generated FormulaPronta da copiare

Caratteristiche del risultato.

Returns number 3 based on sample evaluation criteria and active cell references.

Esempio di output::3
Tipo di dato restituito::Numeric

Migliori Pratiche

  • Use wildcards to find partial text matches: "*east*" matches any cell containing "east".
  • When using logical operators with numbers, enclose the operator and number in double quotes: ">=100".
  • For case-insensitive counts, COUNTIF automatically ignores uppercase/lowercase differences.

Errori Più Frequenti

  • COUNTIF only supports a single condition. If you need to count cells meeting multiple conditions, use COUNTIFS.
  • Text strings over 255 characters return incorrect results in COUNTIF.
Matrice di Compatibilità

Compatibilità per programma e versione.

Verifica tecnica eseguita sui motori di calcolo ufficiali di Microsoft Excel e Google Fogli.

Excel✓
Supportato
Excel 365✓
Supportato
Excel 2021✓
Supportato
Excel 2019✓
Supportato
Google Sheets✓
Supportato
Disponibilità e versioni di Excel

Core standard function supported across all modern and legacy Microsoft Excel versions (365, 2021, 2019, 2016, 2013, 2010), as well as Excel for the Web and Mac.

Note su Google Fogli

100% compatible with Google Sheets. Uses identical argument order, data types, and standard calculation logic.

Domande frequenti.

Domande Tecniche
Can COUNTIF evaluate multiple conditions at once?↓

No, COUNTIF only checks a single condition. To count rows matching multiple simultaneous criteria, use the COUNTIFS function.

How do wildcards work in COUNTIF?↓

You can use an asterisk (*) to match any series of characters (e.g. =COUNTIF(A2:A10, "*East*")) or a question mark (?) to match any single character. To match an actual question mark or asterisk, prepend a tilde (~).