Pinterest Pixel

How to combine CSV files – 2 Quick & Easy Methods

CSV is the most popular format for storing and exchanging data among users. You might often encounter a... read more

Download Excel Workbook
John Michaloudis
Posted on

Steps To Follow

Overview

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

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 – 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.

See also  7 Quick Ways to Convert Excel to PDF & PDF to Excel

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 –

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

See also  Sort All Worksheets By Name Using Macros In Excel

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
How to combine CSV files - 2 Quick & Easy Methods | MyExcelOnline How to combine CSV files - 2 Quick & Easy Methods | MyExcelOnline
See also  Microsoft Excel Training | Free Excel Online Training Courses
Founder & Chief Inspirational Officer at MyExcelOnline.com

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 Academy Online Course.

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