ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Stripping dashes from a number (https://www.excelbanter.com/excel-programming/274925-stripping-dashes-number.html)

Rohit Thomas

Stripping dashes from a number
 
Hello All,

I am working with SS #'s that are imported into an excel
spreadsheet from a delimited text file. The SS #'s in the
text file have dashes that I need to strip. I used the
find\replace method in a macro to do this but the problem
I run into is that it removes the leading zero in certain
SS #'s that have a zero as the first number. I tried
changing the cell format to text before stripping the
dashes but that did not work. Any suggestions on how I can
remove the dashes and keep the leading zeros?

Thanks,
Rohit Thomas

Dave Peterson[_3_]

Stripping dashes from a number
 
Can you do the edit|replace and then apply a custom number format: 000000000



Rohit Thomas wrote:

Hello All,

I am working with SS #'s that are imported into an excel
spreadsheet from a delimited text file. The SS #'s in the
text file have dashes that I need to strip. I used the
find\replace method in a macro to do this but the problem
I run into is that it removes the leading zero in certain
SS #'s that have a zero as the first number. I tried
changing the cell format to text before stripping the
dashes but that did not work. Any suggestions on how I can
remove the dashes and keep the leading zeros?

Thanks,
Rohit Thomas


--

Dave Peterson



All times are GMT +1. The time now is 02:06 PM.

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