Site icon ExcelNotes

How to Count Cells Starting with a Digit

When you work with a worksheet with many different numbers, you may need to count the number of cells that meet a certain criterion. In this article, we will figure out the numbers starting with a digit, and please check here to count cells ending with a digit.

Example: You are working with a dataset with the product in column A, the date a product is sold in column B, and the sale amount in column C.

Formula: How many cells start with 5?

=SUMPRODUCT(–(LEFT(C2:C12,1)="5"))
=SUMPRODUCT((LEFT(C2:C12,1)="5")*1)

The result returns 3, so three numbers in column C start with "5".

Notes: The LEFT Function

Formula:

=LEFT(text, [num_chars])

Explanations:

– Text is required, and the text string contains the characters you want to extract.
– Num_chars is optional and specifies the number of characters you want LEFT to extract.

Exit mobile version