Function Problems

Return and Sort Positive Values in an Excel Dynamic Array

Elise WilliamsElise Williams Dec 2, 2026 869 views

Question details

Return all positive values or their complete records in a sorted dynamic array.

Return and Sort Positive Values in an Excel Dynamic Array
Product
Microsoft Excel
Device & OS
not provided
Scenario
A user wants the first, second, and subsequent values greater than zero, along with matching records when needed.
Observed behavior
The desired result is a sorted list that spills into adjacent cells and updates when source values change.
Before you start

Check that you are using Excel for Microsoft 365, Excel 2021, or a later version that supports FILTER and SORT. Identify the numeric criteria column and leave enough empty cells for the results to spill.

Solution 1Recommended

Filter and sort positive values in a single column

Use this formula to return every value greater than zero in ascending order.

1
Select an output cell

Click an empty cell outside the source range, such as C2, with space below it for the results.

2
Enter the formula

If the values are in A2:A100, enter =SORT(FILTER(A2:A100,A2:A100>0)) and press Enter.

3
Check the spilled results

Review the values below the formula cell. They appear in ascending order and update when values in A2:A100 change.

Filter and sort positive values in a single column
No matching values: If no values are greater than zero, FILTER returns a #CALC! error. To display a message instead, use =SORT(FILTER(A2:A100,A2:A100>0,"No positive values")).
Work with positive values in WPS

Filter and Sort Positive Values in WPS Spreadsheets

In a WPS Spreadsheets version that supports FILTER and SORT, use a dynamic array formula to return positive values and sort them automatically.

  1. 1. Open the spreadsheet: Open WPS Spreadsheets and use Open to select your Excel workbook.
  2. 2. Choose an output cell: Click an empty cell outside the source data and leave room for the results.
  3. 3. Enter the formula: If your WPS version supports FILTER and SORT and the source values are in A2:A100, enter =SORT(FILTER(A2:A100,A2:A100>0)) and press Enter.
  4. 4. Check the results: Review the spilled values and change a source value to confirm that the results update. If the functions are unavailable, use Data > Filter and sort the filtered values instead; that produces a manual result rather than a dynamic array.
Return positive values in ascending order with one formulaReturn complete matching rows by filtering a criteria columnOpen and work with Microsoft Excel XLSX filesUse a familiar spreadsheet interface
microsoft office alternative - wps office

Frequently Asked Questions

How do I return complete rows instead of only positive values?

Use the full record range as FILTER's first argument and the numeric criteria column as its second. For example, =SORT(FILTER(A2:C100,B2:B100>0),2,1) returns matching rows sorted by column B.

Why does my formula show a #SPILL! error?

The output area may contain data or otherwise be blocked. Clear the cells needed for the results and place the formula outside the source range.

How can I sort the positive values from largest to smallest?

Use -1 as SORT's sort-order argument. For example, =SORT(FILTER(A2:A100,A2:A100>0),1,-1) returns positive values in descending order.

What happens if there are no positive values?

Excel's FILTER returns a #CALC! error when no rows match unless you provide an if_empty value. For example, use =FILTER(A2:A100,A2:A100>0,"No positive values").