Excel Study · Module 4: Counting & summing with conditions
Class 37Count unique values
Intermediate2:08 videoFree
Seven orders, but some customers ordered more than once — how many different customers are there? First COUNTIF shows how often each name appears.
Try this AI prompt
Works in ChatGPT, Gemini, Copilot or Claude.
In Excel, A2:A8 has customer names, and some names repeat. Write a formula for D9 that counts how many different customers there are. It must work in Excel 2016.
The answer that works
✓ checked in Excel=SUMPRODUCT(1/COUNTIF(A2:A8,A2:A8))
AI can get Excel wrong. Paste its answer into Excel and test it before you trust it.