logo
search
Function Problems

How to Combine Excel Criteria to Count Cells Beginning With Specific Letters

Emma BrownEmma Brown Oct 12, 2026 869 views

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.

How to Combine Excel Criteria to Count Cells Beginning With Specific Letters
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.
Before you start

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

Solution 1Recommended

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.

1
Select the target cell

Click on the cell where you want the final count to be displayed.

2
Enter the SUM and COUNTIF formula

Type the formula =SUM(COUNTIF(G7:G1000,{"D*","F*"})) into the formula bar. Replace 'G7:G1000' with your actual data range.

3
Calculate the result

Press Enter to execute the formula. The result will display the total number of cells starting with D or F.

Use SUM and COUNTIF With Wildcards (Recommended)
Exact Match Variation: If your cells only contain the exact letter (e.g., just "D" or "F" with no other text), remove the asterisks and use: =SUM(COUNTIF(G7:G1000,{"D","F"}))
Easily process data formulas with WPS Spreadsheet

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. 1. Open your dataset: Launch WPS Spreadsheet and open the workbook containing your target data.
  2. 2. Apply the wildcard formula: Select your desired result cell and enter =SUM(COUNTIF(G7:G1000,{"D*","F*"})).
  3. 3. Get instant results: Press Enter to instantly generate the count of cells matching your specified starting letters.
Fully compatible with Microsoft Excel formulas, including COUNTIF, COUNTIFS, and SUMSeamless support for wildcard searches (* and ?) in text analysisIntuitive and user-friendly interface for building complex functionsLightweight, fast, and free to use across Windows, Mac, and Linux platforms
microsoft office alternative - wps office

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.