How to Return the Top Three Tasks by Priority in Excel
Question details
The user needs a formula to filter task data based on multiple criteria (sector, subsector, and job status) and extract the top three highest-priority tasks.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Extracting and ranking specific project management or task data automatically based on custom priorities and dynamic filters.
- Observed behavior
- The goal is to display the top three highest-priority tasks matching the specified condition array without needing to manually filter and sort the raw dataset.
Ensure you are using a modern spreadsheet application that supports Dynamic Arrays, such as Microsoft 365 or the latest version of WPS Office, as this solution relies on modern functions like FILTER, SORTBY, and TAKE.
Use FILTER, SORTBY, and TAKE Functions to Extract Top Tasks
Combine modern dynamic array functions to seamlessly filter your dataset by custom status conditions, sort it by priority, and extract the top three records.
The FILTER function is used to narrow down the dataset based on multiple criteria, such as matching the sector, subsector, and identifying specific job statuses.
Next, the SORTBY function orders the filtered results targeting the priority column in descending order, putting the most urgent tasks at the top.
Finally, the TAKE function extracts exactly the top three rows from that sorted array to give you a clean, updated top-task list.
Identify your data columns. Use the FILTER function to set conditions for sector, subsector, and allowed statuses. For example: FILTER(B2:V100, (D2:D100=H1)*(E2:E100=H2)*ISNUMBER(XMATCH(V2:V100, {"Active", "On Hold", "Unassigned"}))).
Wrap the FILTER function inside SORTBY. Target your priority column (e.g., F2:F100) and set the sort order to -1 for descending order so the highest priority is first.
Wrap the entire formula inside the TAKE function and specify 3 for the row count. The final formula looks like: =TAKE(SORTBY(FILTER(...), F2:F100, -1), 3).
If you only want certain details instead of the whole row, wrap your final output in the CHOOSECOLS function and enter the column index numbers you wish to display.

Filter and Rank Tasks Effortlessly in WPS Spreadsheet
WPS Spreadsheet fully supports advanced data filtering, sorting, and dynamic arrays. You can easily apply complex functions like FILTER, SORTBY, and TAKE to manage task lists and extract high-priority tasks in seconds without needing manual manipulation.
- 1. Open your task dataset: Launch WPS Spreadsheet and open your .xlsx file containing the task records.
- 2. Select the destination cell: Click on the blank cell where you want the top three filtered tasks to appear.
- 3. Enter the dynamic formula: Type or paste your combined TAKE, SORTBY, and FILTER formula and press Enter.
- 4. Review the dynamic results: The results will automatically spill into the adjacent cells, neatly displaying your top priority tasks.

Frequently Asked Questions
How do I return the bottom three tasks instead of the top three?
To return the bottom tasks, you can either change the sort order in your SORTBY function from descending (-1) to ascending (1), or you can change the TAKE function's row count argument from 3 to -3, which extracts rows from the bottom of the array.
Why is my dynamic formula returning a '#CALC!' error?
A '#CALC!' error typically occurs when the FILTER function finds no records matching your specified criteria. You can prevent this by adding an 'if_empty' argument to your FILTER function, such as FILTER(array, include, "No matching tasks").
How do I filter by only one specific task status?
If you only need to filter by a single status, such as 'Active', you do not need the XMATCH function. Simply replace the ISNUMBER(XMATCH(...)) portion of your formula with a direct condition like (V2:V100="Active").
Can I achieve this in older versions of Excel without dynamic arrays?
Yes, but it requires a much more complex approach combining LARGE, INDEX, and MATCH functions entered as an array formula (using Ctrl+Shift+Enter). It also generally requires helper columns to handle duplicate priority values effectively.




