Calculation Issues

Count Excel Cells Containing 5 or Multiples of 0.005

Khadija KhanKhadija Khan Dec 2, 2026 868 views

Question details

Count cells that contain the digit 5 or numeric values that are multiples of 0.005.

Count Excel Cells Containing 5 or 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.
Before you start

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.

Solution 1Recommended

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.

1
Enter the formula

Select an empty cell, enter =SUMPRODUCT(--(IFERROR(SEARCH("5",A1:A100&""),0)>0)), and press Enter.

2
Adjust the range

In the formula bar, replace A1:A100 with the cells you want to search, then press Enter.

Count cells containing the digit 5
Text-only alternative: For text cells only, use =COUNTIF(A1:A100,"*5*"). Wildcards in COUNTIF do not reliably match numeric cells.
Work with spreadsheet formulas

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. 1. Open the workbook: In WPS Spreadsheet, choose Open and select your spreadsheet file.
  2. 2. Choose an empty cell: Click a blank cell outside the range you want to count.
  3. 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. 4. Save the workbook: Choose File > Save or Save As to keep the result in your workbook.
Count cells containing a digit or numeric multiples.Open and edit Microsoft Excel XLSX and XLS files.Use familiar spreadsheet formulas and a familiar interface.Work with spreadsheets using the free WPS Office suite.
microsoft office alternative - wps office

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.