How to Count Excel Rows That Meet Two Conditions Using COUNTIFS
Question details
The user needs to count the number of rows in a spreadsheet that simultaneously meet at least two specific conditions.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Analyzing tabular data to calculate the total count of records that match multiple criteria, such as applicants who are 18 years old and whose decision is marked as Approved.
- Observed behavior
- The user is looking for the correct formula structure to count rows satisfying multi-condition logic.
Ensure your dataset is organized in clear columns without merged cells, and identify the exact columns that contain the criteria you want to evaluate.
Use the COUNTIFS Function
The COUNTIFS function is the standard and most efficient method to count cells across multiple ranges that meet multiple criteria.
The COUNTIFS function works by checking multiple criteria ranges against specific conditions. All conditions must be met for a row to be counted.
Click on the cell where you want the final count to be displayed.
Type `=COUNTIFS(` to initiate the function.
Select the first range and type your first condition. For example, to check if column A contains 18, enter `A:A, 18`.
Add a comma, then select the second range and condition. For example, to check if column C says Approved, enter `C:C, "Approved"`.
Close the parenthesis and press Enter. Your final formula should look like this: `=COUNTIFS(A:A,18,C:C,"Approved")`.

Easily Manage Complex Formulas with WPS Spreadsheet
WPS Spreadsheet fully supports the COUNTIFS function and all standard Excel formulas, allowing you to seamlessly analyze complex datasets for free.
- 1. Open your data file: Launch WPS Spreadsheet and open the document containing your dataset.
- 2. Access the Function Wizard: Select an empty cell, navigate to the 'Formulas' tab on the ribbon, and click 'Insert Function'.
- 3. Apply COUNTIFS: Search for 'COUNTIFS', select it, and follow the visual prompts to input your ranges and conditions without manually typing the syntax.

Frequently Asked Questions
Can I use COUNTIFS with more than two conditions?
Yes, the COUNTIFS function allows you to add up to 127 range and criteria pairs in a single formula. Just continue adding commas followed by the new range and condition.
Why is my COUNTIFS formula returning a 0?
This usually happens if no single row meets all the specified conditions simultaneously. It can also occur if text conditions aren't enclosed in quotation marks, or if there are hidden spaces in your data cells.
How do I use greater than or less than in a COUNTIFS formula?
To use logical operators, wrap them in double quotation marks along with the number, such as `">18"`. If you are referencing a cell value, use an ampersand to concatenate, like `">"&A1`.




