Count Excel Values That Round to a Specific Number
Question details
Count decimal values that round to a target number without changing the original cells.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A worksheet contains decimal statistical results, and the user wants to count those that round to 45.
- Observed behavior
- The desired result is a count based on rounded values while the original decimal values remain unchanged.
Identify the range containing the numeric results and the whole-number target. The examples below use A1:A6 and a target of 45.
Count Rounded Values with SUMPRODUCT and ROUND
Use this formula to compare each rounded value with the target without changing the source data.
Click an empty cell where you want the count to appear.
Type =SUMPRODUCT(--(ROUND(A1:A6,0)=45)) and press Enter.
Replace A1:A6 with your numeric data range and 45 with the whole number you want to count.

Count Values in the Rounding Interval with COUNTIFS
Use COUNTIFS to count values in the interval that rounds to the positive target 45.
Count Rounded Values in WPS Spreadsheets
Use SUMPRODUCT and ROUND in WPS Spreadsheets to count values that round to a target while keeping the original decimals intact.
- 1. Open the workbook: Open WPS Office, select Open, and choose your spreadsheet file.
- 2. Select an empty cell: In WPS Spreadsheets, click the cell where you want to display the count.
- 3. Enter the formula: Type =SUMPRODUCT(--(ROUND(A1:A6,0)=45)) and press Enter.
- 4. Use your own data: Edit the formula to replace A1:A6 and 45 with your actual range and target.

Frequently Asked Questions
Does the formula change the original decimal values?
No. Entering the SUMPRODUCT and ROUND formula in a separate cell only calculates a count; the values in A1:A6 remain unchanged.
Are 44.5 and 45.5 counted as rounding to 45?
Excel ROUND counts 44.5 as rounding to 45, but 45.5 rounds to 46. The COUNTIFS criteria >=44.5 and <45.5 reflect those boundaries.
How do I count values that round to a different number?
In =SUMPRODUCT(--(ROUND(A1:A6,0)=45)), replace 45 with your target and A1:A6 with your numeric data range.
Can I use the same COUNTIFS boundaries for a negative target?
No. Excel ROUND rounds halfway values away from zero, so the inclusive and exclusive boundaries differ for negative targets. Use SUMPRODUCT with ROUND to avoid setting those boundaries manually.




