remove comma in column

marreco

Well-known Member
Joined
Jan 1, 2011
Messages
609
Office Version
  1. 2010
Platform
  1. Windows
Hi.
I have a worksheet named 'Data' and column 'E' that has followed. values
IDnameValue1Value2number
123Alex5465500,25
354Mark2154500,00
415Joe1232502,25
875Bill6574500,50

<tbody>
</tbody>

I want the last column (number), was well formatted.


50025
50000
50225
50225
60000
50050
I tried a code made by VOG, but I can not adapt it
Code:
Sub test()
With Worksheets("Dados").UsedRange
    .Replace what:=",", replacement:="", Lookat:=xlPart
    .NumberFormat = "00"
End With
End Sub

thank you!!
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
You need to change the name of the sheet in the above code "Dados" to whatever the name of your sheets is which I assume "Data"

so the code would be:

Code:
Sub test()
With Worksheets("Data").UsedRange
    .Replace what:=",", replacement:="", Lookat:=xlPart
    .NumberFormat = "00"
End With
End Sub
 
Upvote 0
Hi.
still does not solve my problem
thank you!!
 
Upvote 0
Are you able to replace the commas by doing a find...replace manually?

Dom
 
Upvote 0
Hi
My original spreadsheet has 10000 rows
 
Upvote 0
I didn't mean by editing the cells yourself. I mean by pressing Ctrl+H and replacing , with nothing.

I'm trying to ascertain whether the commas are there as part of a text string or because the numbers are formatted that way.

Dom
 
Upvote 0
Should I assume English isn't your first language? Do you understand what I'm asking in my previous post?

Dom
 
Upvote 0
Hi.
I'm sorry I did not understand.


there is a way to do this for VBA
 
Upvote 0
Hi.
I'm sorry I did not understand.


there is a way to do this for VBA
 
Upvote 0

Forum statistics

Threads
1,207,094
Messages
6,076,549
Members
446,212
Latest member
KJAYPAL200

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top