WPS Spreadsheet: Filter and Sort Rows Between Two Dates
Question details
The user needs to extract tasks whose start dates fall within an inclusive date range and sort the matching rows by date and duration.

- Product
- WPS Spreadsheet
- Device & OS
- not provided
- Scenario
- A task list contains task names, durations, and start dates. The user wants to enter beginning and ending dates and return only matching tasks in sorted order.
- Observed behavior
- The required filtered and sorted result is not yet generated from the task table.
Confirm that the task, duration, and start-date ranges contain the same number of rows. Enter the beginning date in E12 and the ending date in AB12, and verify that the start-date cells contain real spreadsheet dates rather than text.
Use FILTER and SORT to return tasks between two dates
Use this dynamic-array formula when your WPS Spreadsheet version supports FILTER and SORT functions.
The two comparison tests include both boundary dates: rows are kept when the start date is greater than or equal to E12 and less than or equal to AB12. The returned task and duration columns are then sorted in ascending order.
In this setup, A2:B100 contains the task and duration columns, C2:C100 contains start dates, E12 contains the beginning date, and AB12 contains the ending date.
Click the cell where the filtered list should begin, such as E14, and make sure the cells below and to the right are empty so the formula can spill.
Type =SORT(FILTER(A2:B100,(C2:C100>=E12)*(C2:C100<=AB12)),1,1,2,1) in the selected cell.
Press Enter. WPS Spreadsheet filters rows whose start dates fall within the inclusive range and returns the results sorted by the first column and then by duration in ascending order.
Replace the dates in E12 and AB12 to refresh the result automatically. If no rows match, check the date values and the selected ranges.
Filter and sort date-based task lists in WPS Spreadsheet
WPS Spreadsheet supports dynamic formulas for extracting rows within a date range and sorting the results without manually rearranging the source table. Enter the formula in a clear output area, then update the date cells whenever you need a different task list.
- 1. Open the workbook: Launch WPS Spreadsheet and open the workbook containing the task table.
- 2. Check the source columns: Verify that A2:B100 contains tasks and durations, C2:C100 contains start dates, and E12 and AB12 contain the date boundaries.
- 3. Enter the formula: Select an empty output cell and enter =SORT(FILTER(A2:B100,(C2:C100>=E12)*(C2:C100<=AB12)),1,1,2,1).
- 4. Review and update results: Press Enter to generate the list, then change E12 or AB12 to filter a different date range.

Frequently Asked Questions
Does the formula include tasks on the beginning and ending dates?
Yes. The >=E12 condition includes the beginning date, and the <=AB12 condition includes the ending date.
Which columns should be changed for a different table layout?
Replace A2:B100 with the columns you want returned and replace C2:C100 with the range containing start dates. Keep the filter ranges the same height.
Where should I enter the FILTER and SORT formula?
Select an empty cell outside the source table, preferably with enough blank space below and beside it for the dynamic result to spill, then enter the formula in the formula bar or directly in the cell.
What should I check if no rows are returned?
Confirm that E12 and AB12 contain valid dates, that the beginning date is not later than the ending date, and that C2:C100 uses real date values rather than text.
Can I use this formula with an Excel workbook in WPS Spreadsheet?
Yes. Open the .xlsx workbook in WPS Spreadsheet and place the formula in an empty output area. Formula support can vary by WPS version, so update WPS Office if FILTER or SORT is not recognized.




