ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Find/Replace (https://www.excelbanter.com/excel-worksheet-functions/167557-find-replace.html)

DP7

Find/Replace
 
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.

BoniM

Find/Replace
 
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...

"DP7" wrote:

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.


Don Guillett

Find/Replace
 
try this
Sub Replacedashwoscientific()
Set myrng = Range("M1:M10")
For Each c In myrng
c.Value = "'" & c
Next
myrng.Replace "-", "", LookAt:=xlPart
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"DP7" wrote in message
...
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.




All times are GMT +1. The time now is 11:52 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com