Power Query Problems

How to Pull Data from Multiple Excel Workbooks Based on a Selected Date

Huma Ashraf ChHuma Ashraf Ch Nov 10, 2026 869 views

Question details

The user needs to import and combine data from multiple Excel workbooks and filter the resulting records based on a specific date selected in a master workbook.

How to Pull Data from Multiple Excel Workbooks Based on a Selected Date
Product
Excel
Device & OS
not provided
Scenario
Consolidating daily or date-specific reports from various source files into a single master workbook automatically.
Observed behavior
A structured method is required to automatically pull, append, and filter data across multiple files that share the same date field structure.
Before you start

Ensure all source workbooks are stored in a single dedicated folder and share a consistent column structure, particularly for the date and value columns.

Solution 1Recommended

Use Power Query 'From Folder' to Append and Filter Data

The most efficient way to combine multiple files and filter by date is using the 'From Folder' connector in Power Query.

This method involves pointing Power Query to a specific directory containing all your source files. It will automatically extract and append the data from every workbook in that folder, allowing you to clean and filter the consolidated data in one go.

1
Organize Source Files

Place all the source Excel workbooks you want to import into a single dedicated folder on your computer or network drive.

2
Get Data from Folder

In your master Excel workbook, navigate to the Data tab on the ribbon, click 'Get Data', select 'From File', and then choose 'From Folder'. Browse to your designated folder and click OK.

3
Combine and Transform

In the preview window that appears, click 'Combine & Transform Data'. Select the specific sheet or table name that exists across all your source files, then click OK to open the Power Query Editor.

4
Standardize Date Columns

Locate your date column in the Power Query Editor. Ensure it is formatted correctly by clicking the data type icon in the column header and selecting 'Date'.

5
Filter by Date

Click the filter dropdown arrow on your Date column, select 'Date Filters', and choose 'Equals'. Enter the specific date you need to pull.

6
Load to Master Workbook

Click 'Close & Load' on the Home tab. The combined and filtered data will now be imported into a new worksheet in your master workbook.

Use Power Query 'From Folder' to Append and Filter Data
Quick Refresh: Once set up, you can simply click 'Refresh All' on the Data tab to update your master workbook whenever new files are added to the source folder.
Free Microsoft Office alternative

A Lightweight Alternative for Your Data Processing Needs

While Power Query is a built-in feature of Microsoft Excel, WPS Office provides a free, lightning-fast alternative with excellent format compatibility and an intuitive interface for your daily spreadsheet tasks.

  1. 1. Download WPS Office: Visit the official WPS website and download the free installer package for your operating system.
  2. 2. Install the Software: Run the downloaded file and follow the straightforward on-screen prompts to complete the installation process.
  3. 3. Open Your Spreadsheets: Launch WPS Spreadsheet and easily open your existing Excel workbooks to continue your work seamlessly.
Fully compatible with Microsoft Excel (.xlsx, .xls, .csv) formats to ensure no data loss.Lightweight installation that runs smoothly and efficiently even on older devices.Familiar ribbon interface ensures a seamless transition with zero learning curve.Built-in robust data tools for sorting, filtering, and basic data consolidation.
QA img-9

Frequently Asked Questions

Can Power Query pull data from subfolders?

Yes, when you use the 'From Folder' connector, Power Query automatically pulls files from both the main folder and any subfolders within it. You can filter the 'Folder Path' column in the editor to exclude specific subfolders if needed.

What happens if my source workbooks have different sheet names?

If the sheet names vary across files, the standard combine process might fail. You can bypass this by editing the 'Transform Sample File' step in Power Query and navigating to the sheet via its Item Index (e.g., the first sheet) rather than its specific Item Name.

How do I update the data when new files are added to the folder?

Simply go to the Data tab in your master workbook and click 'Refresh All'. Power Query will automatically scan the folder, detect the newly added files, apply all your transformation steps, and update the final table.

Why am I getting a 'Data Format Error' when combining files?

This error usually occurs if the date or value columns in one of your source files contain text, blank spaces, or incompatible characters instead of actual numbers or dates. Check your source files to ensure all data types are consistent before appending.