How to Combine Excel Criteria to Count Cells Beginning With Specific Letters
Question details
The user needs to count the total number of cells within a specified Excel range that begin with specific letters, such as 'D' or 'F', while accommodating additional characters following the initial letter.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Analyzing text data in a spreadsheet where a combined criteria count is required based on the starting character of cell contents.
- Observed behavior
- Needs to evaluate whether to use combined COUNTIFS functions or a single SUM array formula with wildcard criteria to achieve the desired count.
Determine whether you need to count cells that exactly match the single letters or if you need to count words that start with those letters, as this will determine if you need to use wildcards (asterisks).
Use SUM and COUNTIF With Wildcards (Recommended)
This is the most concise and efficient method for counting cells that begin with multiple specific letters using a single array formula.
By utilizing an array constant (enclosed in curly brackets) inside a COUNTIF function, you can search for multiple conditions simultaneously. The SUM function then adds up the results. The asterisk (*) wildcard represents any number of characters following the target letter.
Click on the cell where you want the final count to be displayed.
Type the formula =SUM(COUNTIF(G7:G1000,{"D*","F*"})) into the formula bar. Replace 'G7:G1000' with your actual data range.
Press Enter to execute the formula. The result will display the total number of cells starting with D or F.

Add Multiple COUNTIFS Formulas Together
A straightforward alternative using basic addition to combine separate COUNTIFS functions.
Use SUM and N Functions for Exact Matches
An alternative array-based approach specifically for counting exact cell values rather than words.
Manage Complex Array Formulas Efficiently in WPS Spreadsheet
You can effortlessly build, execute, and analyze advanced COUNTIF and array formulas in WPS Spreadsheet. It provides a robust and familiar environment for managing large datasets.
- 1. Open your dataset: Launch WPS Spreadsheet and open the workbook containing your target data.
- 2. Apply the wildcard formula: Select your desired result cell and enter =SUM(COUNTIF(G7:G1000,{"D*","F*"})).
- 3. Get instant results: Press Enter to instantly generate the count of cells matching your specified starting letters.

Frequently Asked Questions
How do I count cells containing specific text anywhere in the cell?
To count cells that contain a specific letter or text anywhere (not just at the beginning), place wildcard asterisks on both sides of the letter. For example, use =COUNTIF(A1:A10,"*D*").
Does the COUNTIF function differentiate between uppercase and lowercase letters?
No, COUNTIF and COUNTIFS are case-insensitive functions. Searching for "D*" will successfully count cells starting with an uppercase "D" as well as a lowercase "d".
Can I add more than two letters to my criteria array?
Yes, you can expand the array inside the curly brackets to include as many criteria as you need. For example, you can write =SUM(COUNTIF(G7:G1000,{"D*","F*","A*"})) to count cells starting with D, F, or A.




