# Counting characters at the beginning of a word using the COUNTIF & LEFT Functions in Excel – 3 Steps

### STEP 1 – Create a Dataset

• Create a dataset. Here, B4:C15.

### STEP 2 – Enter the Text You Need to Count

• In F6 (Search), enter B to count the cells have this letter at the beginning of the word.

### STEP 3 – Apply a Formula

• Use this formula in F7.
`=COUNT(IF(LEFT(B5:B15,1)="B",1,""))`

• Press Enter to see the result.

### Final Output

The number of occurrences is displayed.

The LEFT function finds the text from the left side in B5:B15. The IF function determines the condition: counting the occurrence of B. Finally, the COUNT function counts cells based on the condition and returns a number. In the formula, 1 is used to determine that it will count cells that begin with one character.

## Alternative Solutions to Count Specific Texts in Excel

### 1. Combine the SUMPRODUCT, LEFT & LEN Functions to Count a specific Text from the Left

• Use this formula in C18.
`=SUMPRODUCT(--(LEFT(B5:B15,LEN(C17))=C17))`

• Press Enter.

This is the output.

The LEN function computes the length of the text string in C17. The LEFT function searches for the text in the left string in B5:B15. The SUMPRODUCT function calculates the total number of characters.

### 2. Applying the COUNTIF Function to count a Specific Text

• Use this formula in F7.
`=COUNTIF(B5:B15,"*B*")`

• Press Enter.

This is the output.

The COUNTIF function counts the specific text based on the provided condition.

• To find a specific word, use this formula:
`=COUNTIF(B5:B15,"*Best*")`

• You can also find multiple words using this formula:
`=COUNTIF(B5:B15,"*Best Espresso*")`

## Related Articles

<< Go Back to Excel COUNTIF Function | Excel Functions | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Sanjida Mehrun Guria

Hello! Welcome to my blog. I have completed my Bachelor in Architecture from Ashanullah University of Science & Technology, Dhaka. I am a passionate, goal-oriented person with an immense thirst for knowledge and an attitude to grow continuously. Besides Architectural work, I find it very enthusiastic to work in Excel blogging. Exceldemy is a platform where I have got the opportunity to flourish my skill in Microsoft Excel and therefore, here I will be posting blogs related to... Read Full Bio

We will be happy to hear your thoughts

Advanced Excel Exercises with Solutions PDF