Excel Office

Excel How Tos, Tutorials, Tips & Tricks, Shortcuts

Count numbers that begin with in Excel

This tutorial shows how to Count numbers that begin with in Excel using the example below;




To count numbers in a range that begin with specific numbers, you can use a formula based on the SUMPRODUCT function and LEFT functions.

Worked Example:   How to get first word in Excel

In the example shown, the formula in E6 is:


How this formula works

Inside SUMPRODUCT, we use the LEFT function on the range of numbers like this:


This creates an array of results like this:


We then compare each value to “25” to force a TRUE or FALSE result. Note that LEFT automatically converts the numbers to text, so we use the text value “25” for the comparison. The result is an array of TRUE and FALSE values:


Next, we use a double negative co coerce TRUE FALSE values to 1 and zero, which creates a numeric array:


The SUMPRODUCT function then simply sums the elements in the array and returns 4.

Worked Example:   Count cells that do not contain errors in Excel
Worked Example:   Count dates by day of week in Excel

Leave a Reply

Your email address will not be published. Required fields are marked *