How to Import Excel Rows to Another Sheet Based on a Condition
Question details
The user needs to selectively copy specific columns (Employee, Overtime Rate, Hours Worked, Wages Earned) from a primary dataset to a summary sheet, strictly including rows where the hours worked value is greater than zero.
- Product
- Spreadsheets
- Device & OS
- not provided
- Scenario
- Compiling a special-event summary sheet from payroll and productivity records by dynamically extracting records based on a numerical threshold.
- Observed behavior
- Requires a dynamic method to pull matched data across sheets without manually copying and pasting or leaving blank rows for unmatched records.
Format your source data as a Table (Ctrl+T) so that your formulas automatically adjust when new employee records are added to the payroll sheet.
Use the Dynamic FILTER Function
The FILTER function is the fastest and most efficient way to dynamically extract rows to another sheet based on specific conditions in newer spreadsheet versions.
Dynamic array formulas like FILTER spill the results automatically into adjacent cells, meaning a single formula can populate the entire summary sheet.
Open the target summary sheet and select the top-left cell where you want the imported data to start.
Type the formula =FILTER(Table1[[Employee]:[Wages Earned]], Table1[Current Hours Worked]>0, "No matching employees").
Replace 'Table1' and the column names with the actual references used in your workbook, then press Enter to instantly import all matching rows.
Use Advanced Filter or Power Query (For Older Versions)
For users operating on Excel 2019 or older versions that lack dynamic array functions, a Helper Column combined with Power Query or Advanced Filter is required.
Dynamically Filter and Import Data with WPS Spreadsheet
WPS Spreadsheet fully supports advanced dynamic array functions like FILTER, making it incredibly easy to extract conditionally matched rows across multiple sheets without complex workarounds.
- 1. Open your workbook in WPS: Launch WPS Office and open your .xlsx file containing the payroll data.
- 2. Select the target cell: Navigate to your summary sheet and click on the cell where the data should begin.
- 3. Apply the conditional filter: Type =FILTER(Sheet1!A2:D100, Sheet1!C2:C100>0, "") and press Enter to instantly pull the required employee rows.

Frequently Asked Questions
Can I filter data based on multiple conditions across different sheets?
Yes, you can apply multiple conditions in the FILTER function by using an asterisk (*) for AND logic. For example, =FILTER(A2:C100, (B2:B100>0)*(C2:C100="Approved")) will extract rows matching both criteria simultaneously.
Why is my FILTER function returning a #NAME? error?
A #NAME? error indicates that your current spreadsheet software version does not support the FILTER function. You will need to upgrade your software, use WPS Office which supports this function natively, or resort to using Power Query instead.
Will the copied rows update automatically if the source data changes?
Yes, if you use the FILTER formula, the summary sheet will automatically update whenever the source data is modified. However, if you use the Advanced Filter tool, the results are static and the filter must be re-applied to see updates.




