Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
NH NH is offline
external usenet poster
 
Posts: 8
Default Remove hyphens from SSN

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)


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Remove hyphens from SSN

=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.

NH wrote:

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)


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 320
Default Remove hyphens from SSN

first format the cells containing the SSN as text.
Bob Umlas
Excel MVP

"NH" wrote:

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)


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Remove hyphens from SSN

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

--
Don Guillett
SalesAid Software

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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Remove hyphens in text Pat Excel Worksheet Functions 7 October 21st 05 01:30 PM
How do I remove hyphens from a product UPC? skpdpnt Excel Worksheet Functions 2 August 12th 05 06:50 PM
How can I remove all hyphens in a column without retyping? Laurie Excel Discussion (Misc queries) 2 July 6th 05 03:45 PM
how do i remove hyphens from between numbers ian78 Excel Worksheet Functions 5 April 13th 05 03:41 PM
How do i remove the hyphens between numbers without having to edi ian78 Excel Discussion (Misc queries) 2 April 12th 05 05:39 PM


All times are GMT +1. The time now is 12:47 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"