ExcelFormulas logoExcelFormulas.
Perguntar à IA
Matemática e EstatísticaTestado por QA

COUNTIF.

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

Matemática e Estatística
ExcelExcel 365Excel 2021Excel 2019Google Sheets

Como funciona na prática.

COUNTIF é uma função essencial no Excel. Counts the number of cells within a range that meet a single specified condition or criteria. Facilita a automação de relatórios, otimiza consultas de dados e garante máxima produtividade no seu fluxo de trabalho.

💡 Em termos simples.

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

Analogia do Dia a Dia

"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)."

Sintaxe.

Notação Oficial do Excel
=COUNTIF(range, criteria)
Dica: Argumentos entre colchetes [como_este] são opcionais; todos os outros são obrigatórios.

Argumentos.

Confira abaixo o detalhamento de cada parâmetro aceito por esta função.

rangeObrigatório

The group of cells you want to count.

Exemplo: B2:B6
criteriaObrigatório

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

Exemplo: ">=100"

Exemplo passo a passo.

Cenário de Aplicação

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——
Fórmula Aplicada
=COUNTIF(B2:B6, ">=100")
Resultado Esperado::3

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

Gerador de fórmula.

Abrir Assistente Completo

Preencha os campos abaixo para gerar uma fórmula pronta para copiar e colar na sua planilha.

Generated FormulaPronta para copiar

Comportamento do resultado.

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

Amostra de Saída::3
Tipo de Dado::Numeric

Boas Práticas

  • 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.

Erros Mais Comuns

  • 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.
Matriz de Compatibilidade

Compatibilidade de software e versão.

Validação técnica fundamentada nas especificações oficiais da Microsoft e do Google.

Excel✓
Compatível
Excel 365✓
Compatível
Excel 2021✓
Compatível
Excel 2019✓
Compatível
Google Sheets✓
Compatível
Histórico e Versões do 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.

Notas sobre o Google Planilhas

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

Perguntas frequentes.

Dúvidas Técnicas
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 (~).