logo
search
Function Problems

How to Count Specific Letters Like E and L in Excel Columns

Maira MehtabMaira Mehtab Sep 20, 2026 869 views

Question details

The user needs to count the number of times specific letters, such as 'E' and 'L', appear in columns like B and C, and wants to know if they should use TEXTBEFORE combined with COUNTIF.

Excel tutorial: Counting non-empty cells with COUNTIF function
Product
Excel
Device & OS
not provided
Scenario
Counting the exact occurrences of specific text values or characters in designated spreadsheet columns.
Observed behavior
The user is attempting to establish a count for specific letters and is unsure if nesting TEXTBEFORE with COUNTIF is the correct formula approach.
Before you start

Determine if the letters 'E' and 'L' occupy the entire cell (e.g., the cell just says 'E') or if they are embedded within a longer text string, as this changes the required formula.

Solution 1Recommended

Use COUNTIFS to Count Exact Cell Matches

This is the most straightforward method when the cells contain exactly the letter 'E' or 'L' and nothing else.

The COUNTIF and COUNTIFS functions are designed to count the number of cells that meet a single or multiple criteria. There is no need to use TEXTBEFORE if the cell only contains the target letter.

1
Select an output cell

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

2
Enter the COUNTIFS formula

Type the formula =COUNTIFS(B$2:B$6,"L") into the formula bar to count all occurrences of the letter 'L' in the range B2 to B6.

3
Apply and repeat

Press Enter to see the result. You can repeat this process in another cell using =COUNTIFS(B$2:B$6,"E") to count occurrences for the letter 'E'.

Case Sensitivity: The COUNTIF and COUNTIFS functions are not case-sensitive. They will count both uppercase and lowercase versions of the specified letters.
Effortless Data Counting

Count Data Easily with WPS Spreadsheet

WPS Spreadsheet fully supports standard Excel formulas like COUNTIF and COUNTIFS, allowing you to seamlessly calculate and analyze your data. It offers full compatibility with Microsoft Excel files and features a highly intuitive interface.

  1. 1. Open your workbook: Launch WPS Spreadsheet and open the file containing the columns you want to count.
  2. 2. Access the Formula tab: Select the cell for your result and navigate to the 'Formulas' tab on the top ribbon.
  3. 3. Insert the COUNTIFS function: Click 'Insert Function', search for 'COUNTIFS', and input your desired range and criteria (e.g., "E").
  4. 4. Calculate the result: Click 'OK' to instantly calculate the occurrences of the letter in your selected column.
Fully compatible with Microsoft Excel (.xlsx) formats and formulas.Supports advanced functions including COUNTIF, COUNTIFS, and text manipulation.Lightweight, fast, and runs smoothly on Windows, Mac, and Linux.
microsoft office alternative - wps office

Frequently Asked Questions

Can I combine TEXTBEFORE and COUNTIF in Excel?

While you can nest functions, it is rarely necessary for simple counting. If you need to count based on text before a specific character, it's often easier to use an array formula or combine wildcards (like '*') with the COUNTIF function.

How do I count multiple different letters at the same time?

You can add multiple COUNTIF functions together in one formula. For example, use =COUNTIF(B2:B6,"E") + COUNTIF(B2:B6,"L") to get the combined total count of both letters within the specified range.

Are COUNTIF and COUNTIFS case-sensitive?

No, COUNTIF and COUNTIFS treat uppercase and lowercase letters identically. To perform a strictly case-sensitive count, you would need to use a combination of the SUMPRODUCT and EXACT functions.