Get instant live expert help with Excel or Google Sheets
“My Excelchat expert helped me in less than 20 minutes, saving me what would have been 5 hours of work!”

Post your problem and you'll get expert help in seconds

Your message must be at least 40 characters
Our professional experts are available now. Your privacy is guaranteed.

Count cells that begin with

Excel allows a user to count cells that begin with certain characters, by using the COUNTIF function. This step by step tutorial will assist all levels of Excel users in counting cells in a range that begin with a specific text.

Figure 1. The result of the COUNTIF function

Syntax of the COUNTIF Formula

The generic formula for the COUNTIF function is:

=COUNTIF(criteria_range, criteria)

The parameters of the COUNTIFS function are:

  • criteria_range – a range where we want to apply our criteria
  • criteria – a criteria which we want to count

Setting up Our Data for the COUNTIF Function

Figure 2. Data that we will use in the COUNTIF example

In the data table, we have 4 columns:  “Delivery Number” (column B), “Delivery Date” (column C), “City” (column D) and “Amount” (column E). In the cell H2, we have a criteria for the function, while in H3 we want to get a result.

Count Cells That Begin With a Certain Text

In our example, we want to count how many cells from the column D begin with “CA”.

The formula looks like:

=COUNTIF(D3:D9, H2)

The parameter criteria_range is D3:D9 and the criteria is in the cell H2. We have to put an asterisk in criteria (CA*). An asterisk stands for any character.

To apply the COUNTIF function, we need to follow these steps:

  • Select cell H3 and click on it
  • Insert the formula: =COUNTIF(D3:D9, H2)
  • Press enter

Figure 3. Counting the cells that begins with a certain text

As you can see, cells D3, D4, D8 and D9 begin with “CA”, so the result of the function in the cell H3 is 4.

Most of the time, the problem you will need to solve will be more complex than a simple application of a formula or function. If you want to save hours of research and frustration, try our live Excelchat service! Our Excel Experts are available 24/7 to answer any Excel question you may have. We guarantee a connection within 30 seconds and a customized solution within 20 minutes.

Did this post not answer your question? Get a solution from connecting with the expert.

Another blog reader asked this question today on Excelchat:

Leave a Comment

avatar

Subscribe to Excelchat.co

Get updates on helpful Excel topics

Subscribe to Excelchat.co

Did this post not answer your question?
Get a solution from connecting with the expert

Another blog reader asked this question today on Excelchat:

Post your problem and you'll get expert help in seconds

Your message must be at least 40 characters
Our professional experts are available now. Your privacy is guaranteed.
Trusted by people who work at
Amazon.com, Inc
Facebook, Inc
Accenture PLC
Siemens AG
Macy's
The Allstate Corporation
United Parcel Service
Dell Inc