Excel Study · Module 3: Decisions with IF

Class 30COUNTIF with wildcards

Intermediate1:23 videoFree

Wildcards let COUNTIF match a pattern instead of one exact word. An asterisk stands for any number of characters, so "A*" counts every name starting with A.

Try this AI prompt

Works in ChatGPT, Gemini, Copilot or Claude.

In Excel, A2:A9 has first names. Write a formula for D5 that counts how many of the names start with the letter A.

The answer that works

✓ checked in Excel
=COUNTIF(A2:A9,"A*")

AI can get Excel wrong. Paste its answer into Excel and test it before you trust it.

Sources: Microsoft support