Find/Replace

  • Thread starter Thread starter DP7
  • Start date Start date
D

DP7

I have to remove the dashed from the text that follows. 2-604-E53. My problem
is that when I use find/ replace it converts the text to scientific notation.
I have literally hundreds of lines to remove the dashed from. I have tried
changing the format to text the doing the find/replace & it still converts
the text to scientific notation. If anybody has any ideas it would be much
appreciated.
 
Add an apostrophe to the beginning of the first text cell. You will see
'2-604-E53 in the formula bar, but the apostrophe will not appear in the
worksheet. It's a character used to force text formatting on a cell. Use
the format painter to apply this format to the rest of the cells containg
similar data.
Find and replace should then work to remove the dashes...
 
try this
Sub Replacedashwoscientific()
Set myrng = Range("M1:M10")
For Each c In myrng
c.Value = "'" & c
Next
myrng.Replace "-", "", LookAt:=xlPart
End Sub
 

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

Back
Top