How to remove a character from a string using a formula

smalik

Board Regular
Joined
Oct 26, 2006
Messages
186
Office Version
  1. 365
Platform
  1. Windows
I know it is very simple, but I can't seem to figure out the Find/replace or Find/Substitute formula. or is there a Find/Remove formula?

I have a cell with column with US zip codes. Some values are only 5 digits and some are 10 (5 digits plus "-" plus 4 digits)

For example,
51301-7569 or
51360

How do I remove the "-" from the data?

For example, 51301-7569 should turn into 513017569 and if there are only 5 characters then leave the value as is, i.e., 51360 should stay as 51360

I used the find function that gives me the value of 6. This tells me that the "-" is at the six spot. I just can't figure out how to remove this "-"

Any help is greatly appreciated.

Thanks.
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Awesome.... This works. Thank you.

I think I made it too complicated by going in the "FIND" direction.

Once again, Thanks for saving me time.
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,212
Members
452,618
Latest member
Tam84

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top