Function Problems

How to Use Excel COUNTIFS Formula for Values Between Two Ranges

John WilsonJohn Wilson Nov 11, 2026 869 views

Question details

The user needs to count records in a spreadsheet that fall between a specific lower and upper numerical range using the COUNTIFS function.

How to Use Excel COUNTIFS Formula for Values Between Two Ranges
Product
Spreadsheet
Device & OS
not provided
Scenario
Analyzing data and needing to find the total count of entries that meet multiple criteria, specifically those falling within a designated numerical boundary.
Observed behavior
The goal is to correctly format the COUNTIFS formula with multiple criteria to evaluate both the lower and upper bounds of a dataset.
Before you start

Ensure your data is organized in clear columns without merged cells, and identify the specific lower and upper bound values you want to use as your criteria.

Solution 1Recommended

Use COUNTIFS with Cell References for Lower and Upper Bounds

This is the most dynamic method, allowing you to reference cells containing your minimum and maximum values to count the records.

By referencing cells instead of typing numbers directly into your formula, you can easily update your lower and upper limits later without having to rewrite the function.

1
Select the result cell

Click on the empty cell (for example, in column H) where you want the final count to be displayed.

2
Enter the COUNTIFS formula

Type the formula =COUNTIFS(range, ">="&E2, range, "<="&F2), replacing 'range' with your actual data column, 'E2' with your lower bound cell, and 'F2' with your upper bound cell.

3
Calculate the result

Press Enter on your keyboard to execute the formula and view the total number of records that fall between these two values.

Use COUNTIFS with Cell References for Lower and Upper Bounds
Syntax Tip: When combining logical operators like ">=" with cell references, you must enclose the operator in quotation marks and use the ampersand (&) to join it with the cell reference.
Advanced Data Analysis

Count Data Easily with WPS Spreadsheet

WPS Spreadsheet fully supports advanced functions like COUNTIFS, allowing you to seamlessly calculate and analyze data ranges with a familiar interface and 100% compatibility.

  1. 1. Open your workbook: Launch WPS Spreadsheet and open the document containing the data you want to analyze.
  2. 2. Access the Function Wizard: Click on the 'Formulas' tab in the top ribbon and select 'Insert Function'.
  3. 3. Apply COUNTIFS: Search for 'COUNTIFS' in the dialog box, and follow the intuitive prompts to select your data range and input your ">=" and "<=" criteria.
Fully compatible with Microsoft Excel formulas and the .xlsx file format.Built-in function wizard helps you easily build COUNTIFS criteria without memorizing syntax.Free, lightweight, and fast data processing for large datasets.
microsoft office alternative - wps office

Frequently Asked Questions

Can I use COUNTIFS to count dates between two specific dates?

Yes, dates are treated as numbers in spreadsheets. You can use the same logic, such as =COUNTIFS(A2:A10, ">="&DATE(2023,1,1), A2:A10, "<="&DATE(2023,12,31)) to count entries within a specific date range.

Why is my COUNTIFS formula returning zero?

This usually happens if the criteria syntax is incorrect (e.g., missing quotation marks or the ampersand before a cell reference), or if the data in your range is formatted as text instead of actual numerical values.

What is the difference between COUNTIF and COUNTIFS?

COUNTIF is used to count cells based on a single condition, whereas COUNTIFS allows you to apply multiple conditions across different ranges simultaneously, which is required when setting both a lower and an upper bound.