How To Remove Commas in Excel (9 Smart Ways) - ExcelDemy PDF
How To Remove Commas in Excel (9 Smart Ways) - ExcelDemy PDF
In this article, I will show you how to remove commas from the names (placed in the middle / in between /
last) and the numbers in Excel.
At first, download the workbook that I have used to write this tutorial.
Remove-commas-in-Excel
In many ways, commas are added to the numbers. Let’s see how we can remove the commas from the
numbers.
If you have imported some numbers from other places (for example, pdf), the numbers might have
commas in the place of decimal points.
Excel’s SUBSTITUTE Function replaces the existing text with new text in a text string.
Where,
text (Required): The text or the cell reference where the text is that you want to change.
old_text (Required): The text or character you want to replace
new_text (Required): The text that will replace the old text.
instance_num (Required): The number of the old texts will be replaced with the new text. If you don’t
use any value for this parameter, all old texts will be replaced by the new one.
Step 1
Step 2:
To convert the text to number, we just add 0 with the formula: B5: =SUBSTITUTE(A5,",",".") + 0
Now, the text is converted to a number (placed right side of the cell).
Step 3:
If I copy the formula for other cells in the column, we get all the texts with commas are converted to
numbers with decimal points.
We can also use Excel’s Text to Columns wizard to replace commas with decimal points.
Step 1:
Select the data where you want to apply the Text to Columns feature.
Step 2:
Go to Data tab > Data Tools group of commands > Click on the Text to Columns command
Convert Text to Columns Wizard appears > Choose the Fixed width radio button > Then click on the
Next button.
There is nothing to do with Step 2 of 3. So, click on the Next button again.
Step 4:
In step 3 of 3, I click on the Advanced command > Advanced Text Import Settings dialog appears >
Here there are two fields:
As the destination, I select the cell B5 and then I choose the Finish button.
This is the result I get:
You see, all the imported texts with commas are converted to numbers with decimal points.
The disadvantage of using this method: If you change the texts, the numbers will not change. So, it is
better to use the formula (above method).
Step 1:
Select the worksheet where the data is. Now open Excel’s Find and Replace feature. You can open Find
and Replace in two ways:
Home > Editing > Find & Select dropdown > Click on the Replace command
Or use the keyboard shortcut: CTRL + H
In the Find and Replace, in the Find what field, input comma (,) and in the Replace with field, input
decimal point (.).
The disadvantage of using this method: Replacements are done in the same places.
In some cases, you might want to keep the number parts before the comma and want to delete the
comma and the numbers after the commas.
In this case, you can use both the Text to Columns feature and an Excel formula.
Then copy down the formula for other cells in the column. You’re seeing the whole process in the image
below.
How does this formula work?
=LEFT(A5,SEARCH(",",A5)-1)+0
SEARCH(",”,A5)-1): Search function returns the position of the comma (,) in the text in the cell A5. The
position is 4.
Using the LEFT function, we are just returning the first 3 characters from the text.
At the end of the formula, we are adding 0 to make the return value to a number.
Step 1:
Select the text with commas and open the Text to Columns Wizard (Data > Data Tools > Text to
Columns).
In Step 2 of 3, select Comma delimiter (by default it is selected comma for this text set).
In Step 3 of 3, I determine the Destination cell B5 and click on the Finish button.
You’re seeing some numbers here. These numbers are comma separated.
To remove the commas from these numbers, you can use two methods:
Select the numbers > Home > Number group of commands > From the drop-down, choose the General
format
This is what we get:
Method 2: Using Format Cells dialog box
We can also use the Format Cells dialog box to remove thousand separator commas from the numbers.
Step 1:
Select the numbers > Choose the little arrow at the bottom right corner of the Number group of
commands
Step 2:
Format Cells dialog box appears with the Number tab and Number category activated > Just uncheck
the Use 1000 Separator (,) check box.
You’re having some names like the following image. I have also shown the desired output.
How can we do this?
I have used this formula in the cell C2: =SUBSTITUTE(TRIM(SUBSTITUTE(A2,",",""))," ",", ")
=SUBSTITUTE("MSFT NATCF"," ",", "). This part replaces the Spaces with a comma and Space. The
final returned value is: ="MSFT, NATCF"
Suppose, you have a name and the name has a comma in the last. How will you remove that comma?
Obviously, you can use the Replace feature of Excel. Here I am showing the formula method. The whole
process is shown below:
Related Readings
Conclusion
So, there is more than one way to remove commas from numbers, or names. Use one that best suits your
purpose. If you know a smart way, let us know in the comment box. Thanks for becoming a loyal reader of
our blog.
464
SHARES
Facebook Twitter
Kawser
Hello! Welcome to my Excel blog! It took me some time to be a fan of Excel. But now I am a die-
hard fan of MS Excel. I learn new ways of doing things with Excel and share here. Not only how to
guide on Excel, but you will get also topics on Finance, Statistics, Data Analysis, and BI. Stay
tuned!
RELATED ARTICLES
Excel Custom Number Format How to calculate IRR (internal Excel Data Validation Based on
Multiple Conditions rate of return) in Excel (9 easy Another Cell
ways)
INDIRECT Function Excel: Get Excel Index Match How to remove leading zeros in
values from different sheet single/multiple criteria with Excel (8 easy ways)
single/multiple results
LEAVE A REPLY
Post comment
Latest Posts
Stellar Repair for Excel Software Review
no comments
ExcelDemy is a place where you can learn Excel, Data Categories Select Category
Analysis, and other Office related programs. We provide tips,
how to guide and also provide Excel solutions to your business
problems. Search in ExcelDemy.com
Search
Follow Us