Character removal from cells

imported_unknown

Active Member
Joined
Jan 13, 2002
Messages
424
I have a Excel sheet that has numbers like these with dashes and periods. I would like to know if there is a way to select all and remove those dashes and periods without deleting records in my column?
11-1011.01
45-2093.00

Thank You
Sam
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
hey sammy, welcome to the board:

select your range of data
press ctrl+H
in the find what box, type -
press the 'replace all' button

repeat this procedure for removing the . as well

HTH
kevin
 
Upvote 0
In B1 enter and copy down:

=SUBSTITUTE(SUBSTITUTE(A1,"-",""),".","")

where A1 houses a value like 11-1011.01.

If you want a true number as result, use:

=SUBSTITUTE(SUBSTITUTE(A1,"-",""),".","")+0
 
Upvote 0
Hi I love UDFs add this into a standard module and choose any cell any press = and then use the function wizard to select user defined, see my name, thats the UDF formula and select me, now choose your range and press enter should work ok

Function JackintheUK_Remove(Jacks_Cell As String)
Dim Jack As Integer
Const JACKS_TO_REMOVE = "~-"
For Jack = 1 To Len(JACKS_TO_REMOVE)
Jacks_Cell = Application.WorksheetFunction.Substitute(Jacks_Cell, _
Mid(JACKS_TO_REMOVE, Jack, 1), "")
Next Jack
JackintheUK_Remove = Jacks_Cell + 0
End Function


_________________<embed width="200" height="50" src="http://homepage.a5.com/~kristy/misc/jack.swf">
This message was edited by Jack in the UK on 2002-10-04 17:55
 
Upvote 0

Forum statistics

Threads
1,214,624
Messages
6,120,591
Members
448,973
Latest member
ksonnia

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