Count Excel Cells Containing 5 or Multiples of 0.005
Question details
Count cells that contain the digit 5 or numeric values that are multiples of 0.005.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- The user needs a count from a spreadsheet range and must choose between a digit search and a multiple-of-0.005 calculation.
- Observed behavior
- The desired count depends on whether cells contain the digit 5 or hold numeric values divisible by 0.005.
Identify the range to count and decide whether you need a digit search or a numeric multiple test. The formulas below use A1:A100; replace that range with your own.
Count cells containing the digit 5
Use this formula to find the digit 5 in text or numeric cell values.
The formula converts numeric values to text for the search. It tests the underlying value, so displayed digits added by number formatting may not be counted.
Select an empty cell, enter =SUMPRODUCT(--(IFERROR(SEARCH("5",A1:A100&""),0)>0)), and press Enter.
In the formula bar, replace A1:A100 with the cells you want to search, then press Enter.

Count numeric multiples of 0.005
Use a tolerance-based formula to count numeric multiples while reducing decimal rounding effects.
Count matching cells in WPS Spreadsheet
Open your workbook in WPS Spreadsheet and use the same digit-search or tolerance-based formula to count the cells you need.
- 1. Open the workbook: In WPS Spreadsheet, choose Open and select your spreadsheet file.
- 2. Choose an empty cell: Click a blank cell outside the range you want to count.
- 3. Enter a count formula: Enter the digit-search or multiple-of-0.005 formula from above, replace A1:A100 with your range, and press Enter.
- 4. Save the workbook: Choose File > Save or Save As to keep the result in your workbook.

Frequently Asked Questions
Does counting cells containing 5 also count multiples of 0.005?
No. A digit search counts values such as 15 and text containing 5, while the multiple test checks whether a numeric value is divisible by 0.005.
Why not use COUNTIF with *5* for every cell?
The formula =COUNTIF(A1:A100,"*5*") is useful for text, but its wildcard does not reliably match numeric cells. Use the SEARCH and SUMPRODUCT formula to include numeric values.
Why use a tolerance when counting multiples of 0.005?
Spreadsheet decimal calculations can have small floating-point differences. The tolerance-based formula compares the quotient with its nearest integer instead of requiring exact equality.
Does the multiple-of-0.005 formula count zero?
Yes. Numeric zero is a multiple of 0.005. The formula excludes blank cells, text, and error cells.




