Method 1 – Importing a CSV File into Excel and Removing Commas
Steps:
- In the Import Data box, select your CSV file. Here, Removing Commas from CSV File.
- Click Import.
- In the new window, click Transform Data.
- The CSV file will open in the Power Query Editor.
- Click Reduced Row >> click Remove Rows >> select Remove Top Rows.
- In Remove Top Rows, insert 2 in Number of rows.
- Click OK.
- Click Use First Row as Headers.
- Click Close & Load >> select Close & Load To.
- In the Import Data box, check Existing worksheet in Where do you want to put the data?
- Enter B4.
- Click OK.
- This is the output.
Method 2 – Using the Find and Replace Feature in the Text File
Steps:
- Select the CSV File from which you want to remove commas.
- Select Using Find and Replace in Text File.
- Right-click the CSV File.
- Click Open with >> select Notepad.
- The CSV File will open in the Notepad as a Text File.
- Click Edit >> select Replace.
- Enter comma (,) in the search box and a blank ( ) in the replace box.
- Click Replace until all commas are replaced with a blank.
- Cannot find “,” will be displayed.
- Click OK.
- This is the output.
Similar Readings
Method 3 – Use the Text Import Wizard Feature in Excel to Remove Commas
Step 1: Adding Text Legacy in Excel
To find the Text Import Wizard Feature, add the Text Legacy tool in Excel Options.
- Click the File tab.
- Click Options.
- In the Excel Options box, select Data.
- Check From Text (Legacy).
- Click OK.
Step 2: Using the Text Import Wizard Feature
- Go to the Data tab >> click Get Data >> click Legacy Wizards >> select From Text (Legacy).
- In the Import Text File box, select the CSV File. Here, Use of Text Import Wizard Feature.
- Click Import.
- In the Text Import Wizard box, Delimited is selected.
- Click Next.
- Select Comma in Delimiters.
- Click Next.
- Click Finish.
- In the Import Data box, select Existing worksheet.
- Enter B2 in the box.
- Click OK.
- This is the output.
- You can format the dataset as shown below.
Method 4 – Saving the file as Text (MS-DOS)(*.txt) to Remove Commas from CSV File
Steps:
- Import the CSV File following the steps described in Method1.
- Click the File tab.
- Click Save a Copy.
- Name the file. Here, How to Remove Commas in Excel from CSV Files.
- Choose Text (MS-DOS) (*.txt) File.
- Click Save.
- If you have multiple sheets in the Excel workbook a Warning box will be displayed saying it can only save the active sheet.
- Click OK to save the active sheet as Text (MS-DOS) (*.txt).
- If you open the Text file in the Notepad, you will see that the commas were removed.
Download Practice Workbook
Related Articles
<< Go Back To Remove Comma in Excel | Data Cleaning in Excel | Learn Excel
Get FREE Advanced Excel Exercises with Solutions!