I need to remove the hyphen in a list of #s

  • Thread starter Thread starter indymodeler
  • Start date Start date
I

indymodeler

I have a list of numbers as shown
12345-67
12354-58
15454-54
21544-54
I need a formula/macro or something that will allow me to remove the
hyphen.
1234567
1235458
1545454
2154454
Any ideas would be appreciated.
Lakedawgs
 
=SUBSTITUTE(A1,"-","")

and copy down

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
If you prefer a VBA macro,

Sub Example()
Worksheets("Sheet1").Columns("A").Replace _
What:="-", Replacement:="", _
SearchOrder:=xlByColumns
End Sub

(I omitted the MatchCase argument as in this case it is not necessary.)
 
fantastic, up to this point ive been saving to csv files and then "find and
replace"..or to that effect.
 
Hi

not sure what i'm missing, but i would just select the range in excel and
use edit / replace
find: -
replace with: <<leave blank>>
and then click the replace all button

Cheers
JulieD
 
Back
Top