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

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

kskinne

Well-known Member
Joined
Feb 17, 2002
Messages
1,267
Office Version
  1. 365
Platform
  1. Windows
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
 

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,209
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
 

Jack in the UK

Well-known Member
Joined
Feb 16, 2002
Messages
3,215
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
 

Forum statistics

Threads
1,144,274
Messages
5,723,440
Members
422,497
Latest member
dougy99

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
Top