headermask image

Business Tools Blog

How to remove just the dashes in a text string in Excel

Brian sent the following question.

If I have a field that has a number (can change the format to “text” if needed) such as “03-506-46” and I want to take the dashes out so it looks like “0350646” is there a function that does this? Or, do you have to “F2” and manually edit each one?

Excel can be tricky, especially if you want to leave the leading zero.  However, with 2 quick steps you can accomplish your goal.

Step 1 - Type Ctrl+H to bring up the Find/Replace menu.  Type “-” in the Find what box and leave the Replace with box blank.  Click Replace All.

Photobucket

Step 2 - Add the zero back to the front of the string with this formula in column B =“0”&A1

Photobucket

Your result is in column B:

Photobucket

If you liked my post, feel free to subscribe to my rss feeds

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*