How to Merge Payroll CSV Data with Employee Names in Microsoft Access
Question details
The user needs to combine payroll CSV data containing employee IDs with another dataset containing employee names in Microsoft Access.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- Transitioning from Excel VLOOKUP workflows to an Access database after a payroll system format change.
- Observed behavior
- The user wants to join separate tables (payroll data and HR data) using employee IDs to generate comprehensive reports.
Ensure that your payroll CSV file and the HR employee list both contain a common identifier field, such as an Employee ID, formatted as the exact same data type.
Merge Data by Joining Tables in an Access Query
Import both datasets as separate tables and use an Access Query to join them on the Employee ID field, effectively replacing Excel's VLOOKUP function.
This method leverages relational database features to link data without redundant typing. It is highly efficient for recurring reports where raw CSV data is regularly updated.
In Microsoft Access, go to the 'External Data' tab, select 'New Data Source', choose 'From File', and then 'Text File'. Import your HR file containing employee names and IDs to create a master user table.
Repeat the import process for the new payroll CSV file. Ensure the Employee ID field matches the data type of the ID field in your employee data table.
Navigate to the 'Create' tab and click 'Query Design'. Add both the employee data table and the payroll CSV table to the query workspace.
Click and drag the Employee ID field from the user table to the Employee ID field in the payroll table to establish a relationship line (join) between them.
Double-click the desired fields from both tables (e.g., Employee Name from the user table, Salary/Hours from the payroll table) to add them to the query grid below. Click 'Run' on the Design tab to view the merged results.

Manage Your Data Efficiently with WPS Office
While Microsoft Access is a powerful database tool, many data merging and reporting tasks can be handled seamlessly in WPS Spreadsheet. Enjoy a lightweight, fast, and highly compatible alternative to Microsoft Office that supports complex formulas like VLOOKUP, XLOOKUP, and pivot tables without the steep learning curve of relational databases.
- 1. Open your CSV in WPS Spreadsheet: Launch WPS Office and open your payroll CSV file directly to begin processing.
- 2. Insert your Employee Data: Add a new sheet and paste your master employee list containing names and IDs.
- 3. Use Data Merge Formulas: Utilize XLOOKUP or VLOOKUP to instantly fetch employee names based on the IDs, taking advantage of WPS's fast processing for large data.

Frequently Asked Questions
Why did my table join in Access return zero results?
This usually happens when the joined fields have different data types (e.g., one is formatted as 'Text' and the other as 'Number') or if there are hidden spaces in the CSV data. Ensure both Employee ID fields have identical formatting.
Can I link the CSV file instead of importing it?
Yes. In the External Data tab, you can choose to 'Link to the data source by creating a linked table'. This allows your Access query to read the CSV dynamically whenever the external file is updated.
How do I handle a 1-to-many relationship in this payroll query?
If one employee has multiple payroll records (e.g., overtime, bonuses), ensure the Employee Master Table is on the '1' side of the join and the Payroll CSV is on the 'Many' side. The query will accurately duplicate the employee name for each payroll line.




