Pinterest Pixel

How to combine CSV files – 2 Quick & Easy Methods

John Michaloudis
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.

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 ā€“ download excelĀ workbookSales-Data.zip

 

Method 1 – Using Windows Command Prompt

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

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.

How to combine CSV files - 2 Quick & Easy Methods | MyExcelOnline

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 –

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!

 

Conclusion

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 it


Founder & Chief Inspirational Officer

at

John Michaloudis is a former accountant and finance analyst at General Electric, a Microsoft MVP since 2020, an Amazon #1 bestselling author of 4 Microsoft Excel books and teacher of Microsoft Excel & Office over at his flagship MyExcelOnline Academy Online Course.

See also  Highlight Custom Text Using Macros In Excel

Star 30 Days - Full Access Star

One Dollar Trial

$1 Trial for 30 days!

Access for $1

Cancel Anytime

One Dollar Trial
  • Get FULL ACCESS to all our Excel & Office courses, bonuses, and support for just USD $1 today! Enjoy 30 days of learning and expert help.
  • You can CANCEL ANYTIME ā€” no strings attached! Even if itā€™s on day 29, you wonā€™t be charged again.
  • You'll get to keep all our downloadable Excel E-Books, Workbooks, Templates, and Cheat Sheets - yours to enjoy FOREVER!
  • Practice Workbooks
  • Certificates of Completion
  • 5 Amazing Bonuses
Satisfaction Guaranteed
Accepted paymend methods
Secure checkout

Get Video Training

Advance your Microsoft Excel & Office Skills with the MyExcelOnline Academy!

Dramatically Reduce Repetition, Stress, and Overtime!
Exponentially Increase Your Chances of a Promotion, Pay Raise or New Job!

Learn in as little as 5 minutes a day or on your schedule.

Learn More!

Share to...