How to Import Excel Data to Another Workbook Based on Hours Worked
Question details
The user needs a method to automatically extract and import specific columns (employee name, overtime, hours, wages, cost) from one spreadsheet to another, exclusively for employees whose 'Current Hours Worked' is greater than zero.

- Product
- Spreadsheets
- Device & OS
- not provided
- Scenario
- Automating conditional data extraction across different workbooks to generate filtered reports.
- Observed behavior
- The destination spreadsheet needs to dynamically display only the records and required columns that meet the >0 hours condition from the source table without manual copying.
Ensure both your source and destination workbooks are saved in the same local folder or cloud directory, and check if your spreadsheet software supports dynamic array formulas like FILTER for the most seamless setup.
Use the FILTER Function for Dynamic Data Import
Ideal for modern spreadsheet versions, the FILTER function automatically extracts data that meets specific criteria without the need for complex helper columns.
The FILTER function is a powerful dynamic array formula that can pull data from a source workbook based on one or more conditions. It updates automatically when the source data changes.
Open both your source workbook (containing the employee data) and the destination workbook where you want the filtered data to appear.
In the destination workbook, select the top-left cell where the data should start. Type =FILTER( to begin the formula.
Switch to the source workbook and highlight the columns you want to import (e.g., Employee, Overtime, Hours, Wages, Cost). This will be your first argument.
Type a comma, then select the 'Hours Worked' column in the source workbook. Add >0 to specify the condition (e.g., [Source.xlsx]Sheet1!$C$2:$C$100>0).
Type a closing parenthesis ) and press Enter. The destination workbook will now automatically populate with only the employees who have worked hours greater than zero.

Use a Helper Column and INDEX/MATCH
Best for older spreadsheet versions (like Excel 2019 or earlier) that do not support dynamic array formulas.
Easily Import and Filter Data Across Workbooks with WPS Spreadsheet
WPS Spreadsheet fully supports advanced dynamic array functions like FILTER, allowing you to instantly pull conditional data such as employee hours from one workbook to another without complicated setups.
- 1. Launch WPS Spreadsheet: Open WPS Office and create a new Spreadsheet to serve as your destination workbook.
- 2. Initiate the FILTER function: Type =FILTER( in your target cell, then switch to your open source workbook to select the data range containing employees, wages, and costs.
- 3. Set your data criteria: Define the condition by selecting the 'Hours Worked' column in the source workbook and typing >0.
- 4. Extract your data instantly: Press Enter to automatically import and populate only the records that meet the criteria seamlessly.

Frequently Asked Questions
Will the destination workbook update automatically when source data changes?
Yes, formula-based connections will update automatically when both workbooks are open. If the source workbook is closed, you may need to click 'Enable Content' or refresh data links upon opening the destination workbook.
Why does my FILTER function return a #CALC! error?
The #CALC! error in the FILTER function typically occurs when there are no records that meet your condition (e.g., no employees have hours worked > 0). You can fix this by adding a third argument to your formula, such as =FILTER(A:B, C:C>0, "No results").
Can I use Power Query to import data conditionally instead of formulas?
Yes, Power Query is excellent for this task. You can go to Data > Get Data, import the source workbook, apply a filter to the 'Hours Worked' column to only include values greater than zero, and load the refined table into your destination workbook.
How do I filter based on multiple conditions at once?
You can add multiple conditions in the FILTER function by multiplying them. For example, to filter for hours > 0 and a specific department, use =FILTER(array, (hours_range>0)*(department_range="Sales")).




