Function Problems

Use MAX and MIN Results in COUNTIFS Criteria in Excel

Maira MehtabMaira Mehtab Nov 12, 2026 869 views

Question details

The user needs to count purchase orders whose values fall between changing minimum and maximum limits calculated by formulas.

Product
Microsoft Excel or WPS Spreadsheet
Device & OS
not provided
Scenario
A COUNTIFS formula must use the results of MIN and MAX as its lower and upper criteria limits.
Observed behavior
The user needs COUNTIFS to evaluate formula results dynamically instead of treating the criteria as fixed values.
Before you start

Confirm that the purchase order values are stored as numbers and identify the range used to calculate the active minimum and maximum. Make sure every COUNTIFS criteria range has the same dimensions as the purchase order range.

Solution 1Recommended

Combine comparison operators with MIN and MAX in COUNTIFS

Use this formula when the lower and upper limits should update automatically from a changing range of active values.

COUNTIFS criteria can combine a comparison operator with a calculated result by using the concatenation operator (&). MIN supplies the lower boundary, while MAX supplies the upper boundary.

1
Select the result cell

Click the cell where you want to display the number of qualifying purchase orders.

2
Enter the dynamic COUNTIFS formula

Enter =COUNTIFS(A:A,">="&MIN(active_range),A:A,"<="&MAX(active_range)), replacing A:A with the purchase order values range and active_range with the range used to calculate the current minimum and maximum.

3
Confirm the formula

Press Enter and verify that the result counts values greater than or equal to the MIN result and less than or equal to the MAX result.

4
Check the source ranges

Review the formula if the result is unexpected; the purchase order values must be numeric, and all COUNTIFS ranges must contain matching numbers of rows or columns.

Dynamic limits update automatically: When values in active_range change, MIN and MAX recalculate and COUNTIFS uses the new boundaries.

Calculate Dynamic MIN and MAX COUNTIFS Results in WPS Spreadsheet

WPS Spreadsheet supports COUNTIFS with concatenated comparison operators and formula results, allowing you to count purchase orders between dynamic MIN and MAX values. Its familiar spreadsheet interface makes it easy to open, edit, and save Excel workbooks.

  1. 1. Open a spreadsheet: Launch WPS Office, choose Spreadsheet, and open the workbook containing the purchase order data.
  2. 2. Choose the output cell: Click the cell where the dynamic purchase order count should appear.
  3. 3. Enter the formula: Type =COUNTIFS(A:A,">="&MIN(active_range),A:A,"<="&MAX(active_range)), replacing the example ranges with your actual data ranges.
  4. 4. Verify and save: Press Enter, check that the count is correct, and use File > Save or Save As to store the workbook.
Build COUNTIFS formulas with dynamic MIN and MAX boundariesUpdate purchase order counts automatically when source values changeUse a familiar spreadsheet interface with formula editing toolsOpen and save Microsoft Excel XLS and XLSX files with compatible formatting
microsoft office alternative - wps office

Frequently Asked Questions

How do I use a MIN result as a COUNTIFS criterion?

Concatenate the greater-than-or-equal operator with the MIN formula, such as ">="&MIN(active_range), inside the COUNTIFS criteria arguments.

How do I use a MAX result as the upper COUNTIFS limit?

Concatenate the less-than-or-equal operator with MAX, using a criterion such as "<="&MAX(active_range).

Why does COUNTIFS return an incorrect result with this formula?

Check that the counted values are numeric, the criteria ranges have matching dimensions, and the comparison operators are enclosed in quotation marks and joined to the formulas with &.

Can I replace full-column references with specific ranges?

Yes. For better performance, use a bounded range such as A2:A500 instead of A:A, and ensure the active_range and every COUNTIFS range cover the intended data.

Will the count update when the active values change?

Yes. MIN and MAX recalculate when the source range changes, and COUNTIFS reevaluates the criteria using the updated boundary values.