Skip to content
Free Excel Tutorials
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Data Analysis

  • How to count table columns in Excel
  • Add Outline to Data in Excel
  • Example of COUNTIFS with variable table column in Excel
  • Excel Line Chart
  • Understanding Pivot Tables in Excel

References

  • How to reference named range different sheet in Excel
  • How to use Excel ROWS Function
  • Last row number in range
  • How to use Excel ROW Function
  • Excel Advanced Lookup using Index and Match Functions

Data Validations

  • Excel Data validation allow weekday only
  • Prevent invalid data entering in specific cells
  • Excel Data validation must begin with
  • Excel Data validation require unique number
  • Excel Data validation exists in list

Count numbers third digit equals 3 in Excel

by

This tutorial shows how to Count numbers third digit equals 3 in Excel using the example below;

Formula

=SUMPRODUCT(--(MID(range,3,1)="3"))

Explanation

To count numbers where the third digit equals 3, you can use a formula based on the SUMPRODUCT and MID functions. In the example shown, the formula in E5 is:

=SUMPRODUCT(--(MID(B5:B12,3,1)="3"))

How this formula works

To get the third character from a string in A1, you can use the MID function like this:

=MID(A1,3,1)

The first argument is a cell reference, the second argument specifies the start number, and the third argument indicates number of characters.

If you give the MID function a range of cells for the first argument, you’ll get back an array of results. In the example shown, this expression:

MID(B5:B12,3,1)

returns an array like this:

{"6";"6";"3";"5";"3";"0";"3";"7"}

This array contains the third digit from each cell in the range B5:B12. Notice the MID function has automatically converted numeric values in the range to text strings and returned the third character as a text value.

When we compare this array using =”3″, we get an array like this:

{FALSE;FALSE;TRUE;FALSE;TRUE;FALSE;TRUE;FALSE}

We use the double negative to coerce the TRUE and FALSE values to 1 and zero respectively, which returns:

{0;0;1;0;1;0;1;0}

Finally, with only one array to work with, the SUMPRODUCT function sums the items in the array and returns the total, 3.

Post navigation

Previous Post:

How to use Excel CHOOSE Function

Next Post:

Customize Ribbon In Excel

Leave a Reply Cancel reply

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

Learn Basic Excel

Ribbon
Workbook
Worksheets
Format Cells
Find & Select
Sort & Filter
Templates
Print
Share
Protect
Keyboard Shortcuts

Categories

  • Charts
  • Data Analysis
  • Data Validation
  • Excel Functions
    • Cube Functions
    • Database Functions
    • Date and Time Functions
    • Engineering Functions
    • Financial Functions
    • Information Functions
    • Logical Functions
    • Lookup and Reference Functions
    • Math and Trig Functions
    • Statistical Functions
    • Text Functions
    • Web Functions
  • Excel VBA
  • Excel Video Tutorials
  • Formatting
  • Grouping
  • Others

Logical Functions

  • IF with boolean logic in Excel
  • How to use Excel OR Function
  • How to return blank in place of #DIV/0! error in Excel
  • Complete List of Excel Logical Functions, References and Examples
  • TRUE function: Description, Usage, Syntax, Examples and Explanation

Date Time

  • Add workdays to date custom weekends in Excel
  • Calculate expiration date in Excel
  • DAYS360 function: Description, Usage, Syntax, Examples and Explanation
  • Display Date is same month in Excel
  • Calculate total hours that fall between two times in Excel

Grouping

  • Running count group by n size in Excel
  • How to randomly assign data to groups in Excel
  • Group numbers at uneven intervals in Excel
  • Group times into 3 hour buckets in Excel
  • Map inputs to arbitrary values in Excel

General

  • 3D SUMIF for multiple worksheets in Excel
  • 44 Practical Excel IF function Examples
  • Automatically fill series of cells in Excel using AutoFill
  • How to calculate percent variance in Excel
  • How to Insert Cells, Row and Rows in Excel
© 2025 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning