
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Count Strings with Leading Zeros in Excel
Excel is a powerful tool that allows users to perform various calculations and data manipulations. One common task in Excel is to count the occurrences of certain strings or values in a range of cells. However, sometimes the strings in question may have leading zeros, which can cause problems when trying to count them.
In this tutorial, we will cover how to count strings with leading zeros in Excel. We will explore different methods to achieve this, including using the COUNTIF function with wildcards, using the SUMPRODUCT function with the -- operator, and using a combination of LEFT, LEN, and SUM functions. By the end of this tutorial, you will be able to accurately count strings with leading zeros in your Excel spreadsheets, saving you time and increasing your productivity.
Count Strings With Leading Zeros
Here we will first get any one of the results using the formula and then use the auto-fill handle to complete the task. So let us see a simple process to know how you can count strings with leading zeros in Excel.
Step 1
Consider an Excel sheet where you have a list of numbers with leading zeros, as shown in the below image.

We can count the total number of values using the formula =COUNTA(A2:A13).
Empty cell > Formula Gt; Enter.

Step 2
Now click on an empty cell and enter the formula as =SUMPRODUCT(--($A$2:$A$13=A2)) and click enter to get the first value. In the formula, the range of cells containing numbers is A2:A13.
Empty cell > Formula > Enter.

Step 3
Now to fill all the values, drag down from the first values using the auto-fill handle.

Conclusion
In this tutorial, we used a simple example to demonstrate how you can count strings with leading zeros in Excel to highlight a particular set of data.