Remove hyphens from SSN

G

Guest

Please help...

Is there a way to remove hyphen from SSN without stripping out the leading
zeros?

I used the replace function under the Edit menu -- Find "-" and Replace with
"". It worked on some SSNs but didn't on the SSNs with leading zeros.

001-23-4567 ==>1234567 (expected result = 001234567)
 
D

Dave Peterson

=substitute(a1,"-","")
will return text

=--substitute(a1,"-","")
will return numbers. You could use format|cells|custom and give it a custom
format of 000000000.

Or select your cells
edit|replace
what: - (hyphen)
with: (leave blank)
replace all

And use that same custom format.
 
D

Don Guillett

try this in a helper column. Could be a macro.
=SUBSTITUTE(SUBSTITUTE(a3,"-",""),"-","")
 

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

Top