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

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
 
B

Bob Phillips

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

and copy down

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
W

Wm Seales

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.)
 
J

JP

fantastic, up to this point ive been saving to csv files and then "find and
replace"..or to that effect.
 
J

JulieD

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top