Combine CSV Files

CSV is the most popular format for storing and exchanging data among users. You might often encounter a situation where you have multiple CSV files from diverse sources and you want to combine CSV files in Excel. The process of merging CSV files into a single file can significantly improve analysis and facilitate easier data access.

In this guide, we’ll explore step-by-step instructions on how to merge multiple CSV files into one file.

Let us look at two methods in detail.

Download the Excel Workbook below to follow along and understand How to Combine CSV files –


Method 1 – Using Windows Command Prompt

Below are step-by-step instructions on how to combine multiple CSV files using the Windows Command Prompt –

See also  Reverse Text Function Using Macros In Excel

STEP 1: Place all the CSV files in one folder.

Combine CSV files

STEP 2: Select the folder containing the CSV files and press Ctrl +Shift + C to Copy Path.

Combine CSV files

STEP 3: In the Windows search box, type the command prompt and select the application.

Combine CSV files

STEP 4: In the Command Prompt window, type cd followed by a space and then paste the folder path by pressing Ctrl + V.

Combine CSV files

STEP 5: Use the copy command to combine all CSV files into one. The wildcard * is used to include all files with the CSV extension.

copy *.csv combined-csv-files.csv

Combine CSV files

The name of the combined csv file will be combined-csv-files.csv. The combined file will look like this –

Combine CSV files

You can format it as per your requirements.

Combine CSV files


Method 2 – Using Power Query

Instead of using the Windows command prompt to combine CSV files, you can use the Power Query feature in Excel to easily combine them with just a few clicks. Follow the steps below to know how –

See also  Spell check and Highlight Misspellings Using Macros In Excel

STEP 1: Click on the Data tab and then navigate to the Get Data option.

Combine CSV files

STEP 2: In the Get Data menu, select From File > From Text/CSV.

Combine CSV files

STEP 3: Select the file named Desktop Sales and select Open.

Combine CSV files

STEP 4: Check the sample in the dialog box and click Load.

Combine CSV files

The data for desktop sales will be loaded in the worksheet.

Combine CSV files

STEP 5: Repeat the same steps (Steps 1 to 4) to import the sales data for laptops, tablets, and smartphones as well.

Combine CSV files

Click here to learn how to combine multiple Excel worksheets using Power Query!



This guide explores two methods for achieving this – Method 1 involves using the Windows Command Prompt, while Method 2 utilizes the Power Query feature in Excel, allowing users to seamlessly combine CSV files with just a few clicks.

The choice between these methods depends on individual preferences and specific data management needs.

Click here to learn all about combined CSV files.

If you like this Excel tip, please share itEmail this to someone


Pin on Pinterest


Share on Facebook


Tweet about this on Twitter


Share on LinkedIn