Function Problems

How to Use FILTER and SORT Instead of a BETWEEN Function in Excel

Olivia MillerOlivia Miller Oct 26, 2026 869 views

Question details

The user wants to extract specific names associated with numbers that fall between two defined limits and needs the final results to be optionally sorted.

How to Use FILTER and SORT as a BETWEEN Function in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
Extracting a dynamic list of records matching a numerical range since a native BETWEEN formula does not exist.
Observed behavior
To successfully return a dynamic, automatically updating list of names associated with numbers within two boundaries, effectively replicating the logic of a BETWEEN function.
Before you start

Verify that you are using a modern version of Excel (Microsoft 365, Excel 2021, or newer) since FILTER and SORT are dynamic array functions that will not work in older versions.

Solution 1Recommended

Use FILTER and SORT to Replicate BETWEEN Logic

Combine the FILTER function with multiplication operators (*) for multiple conditions, and optionally wrap it in a SORT function to organize the output.

Because Excel does not have a dedicated BETWEEN function, you can multiply two logical tests together within the FILTER function. The asterisk (*) acts as an AND operator, meaning both the lower-limit and upper-limit conditions must be true.

1
Select a destination cell

Click on the empty cell where you want the top of your filtered and sorted list to appear. Ensure there is empty space below it for the results to spill.

2
Write the FILTER formula for unsorted results

Type `=FILTER(A:A, (B:B>=C2)*(B:B<=D2), "No match")` where Column A contains the names you want to return, Column B contains the numbers to check, C2 is your lower limit, and D2 is your upper limit.

3
Add the SORT function

To organize your results, wrap the previous formula in SORT: `=SORT(FILTER(A:A, (B:B>=C2)*(B:B<=D2), "No match"), , 1)`. The '1' dictates ascending order.

4
Execute the formula

Press the Enter key. The array will automatically extract and display all names that correspond to the numbers between your specific criteria.

Use FILTER and SORT to Replicate BETWEEN Logic
Submitting Feature Feedback: If you wish Excel had a native BETWEEN function, you can submit this suggestion by navigating to File > Feedback > I have a suggestion, or by visiting the official Excel Feedback Portal.

Filter and Sort Data Easily with WPS Office

WPS Office Spreadsheet fully supports dynamic array functions like FILTER and SORT. You can easily create custom multi-condition formulas for your data analysis in a familiar interface.

  1. 1. Open your dataset: Launch WPS Office Spreadsheet and open the workbook containing the names and numeric values.
  2. 2. Enter the FILTER array formula: Click into an empty cell and enter `=FILTER(A:A, (B:B>=C2)*(B:B<=D2), "No match")` to replicate the BETWEEN behavior.
  3. 3. Nest within a SORT function: Update the formula to `=SORT(FILTER(A:A, (B:B>=C2)*(B:B<=D2), "No match"))`.
  4. 4. View your spilled results: Press Enter to instantly apply the dynamic array and view your organized data spilling downwards.
100% compatibility with Microsoft Excel formulas and dynamic arrays.Lightweight application that runs quickly and smoothly on all devices.Free to download and use with a highly intuitive user interface.
microsoft office alternative - wps office

Frequently Asked Questions

Why is my FILTER formula returning a #CALC! error?

The #CALC! error usually occurs when the FILTER function finds no matches and the optional [if_empty] argument is left blank. You can fix this by adding a text string at the end of your formula, such as `=FILTER(A:A, (B:B>=C2)*(B:B<=D2), "No match")`.

Can I use multiple criteria with the FILTER function in Excel?

Yes. You can use multiple criteria by enclosing each logical test in parentheses and multiplying them together using an asterisk (*). This acts as an AND logic operator, which is exactly how you mimic BETWEEN limits.

Do the FILTER and SORT formulas work in older versions of Excel?

No, FILTER and SORT are Dynamic Array functions available only in Microsoft 365, Excel 2021, and newer versions. If you are using an older version, you must rely on alternative methods such as the Advanced Filter tool, PivotTables, or a combination of INDEX and AGGREGATE.

How do I sort by a different column using the SORT function?

The SORT function includes a [sort_index] argument. If your filtered array returns three columns and you want to sort by the second column, you would write `=SORT(FILTER(...), 2, 1)`, where '2' is the column index and '1' is for ascending order.