w3resource

Excel Formulas - Count number of cells begins with string

Count number of cells begins with string

Count no. of cells begins with string

Syntax of used function(s)

COUNTIF(criteria_range, criteria)

The COUNTIF function is used to count the number of cells that meet a certain criteria.

Explanation

To count number of cells from a range of cells that begins with a specific text, the COUNTIF function can be used.

Formula


=COUNTIF(B5:B11,"DS*")

How the formula works

In the above example the COUNTIF function counsts the number of cells which begins with the text "DS". The wildcard "*" have been used to match any other characters after the text "DS".

Count number of cells begins with string using range name and criteria range

Count no. of cells begins with string using range name and criteria range

Explanation

To count number of cells from a range of cells that begins with a specific text, the COUNTIF function can be used. The range B5:B11 named as Invoice_No.

Formula


=COUNTIF(Invoice_No,D8)

How the formula works

In the above formula the range have assigned by a name and D8 is the criteria variable. The COUNTIF counts the value of D8 within the range "Invoice_no" and return the result.

Previous: Excel Formulas - Count cells which are not equal to each value of a given range
Next: Excel Formulas - Compare columns of a row



Become a Patron!

Follow us on Facebook and Twitter for latest update.

It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.

https://www.w3resource.com/excel/formulas/count/count-no-of-cells-begins-with-string.php