ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   social security sorting (https://www.excelbanter.com/excel-worksheet-functions/9818-social-security-sorting.html)

Precious Pearl

social security sorting
 
I am having problems with sorting social secuirity/tax id numbers that were
dropped into excel from several different sources. Some of the ss/tax id
numbers have dashes and some do not. Some of the ss/tax id numbers are
missing leading zero's. I am not able to change all of them into a text
format.

How can I formatt them all so they will sort properly?

Thanks for any assistance out there.

Myrna Larson

Don't change them to text. Change them to numbers. Remove all of the dashes
with Search and Replace. Then apply the special format for Social Security
numbers.


On Tue, 25 Jan 2005 05:45:02 -0800, "Precious Pearl" <Precious
wrote:

I am having problems with sorting social secuirity/tax id numbers that were
dropped into excel from several different sources. Some of the ss/tax id
numbers have dashes and some do not. Some of the ss/tax id numbers are
missing leading zero's. I am not able to change all of them into a text
format.

How can I formatt them all so they will sort properly?

Thanks for any assistance out there.



Jason Morin

I'm not sure what form tax id's are supposed to take, but
to format all the SSN's correctly, try:

=TEXT(REPT("0",9-LEN(SUBSTITUTE(A1,"-","")))&A1,"000-00-
0000")

HTH
Jason
Atlanta, GA

-----Original Message-----
I am having problems with sorting social secuirity/tax

id numbers that were
dropped into excel from several different sources. Some

of the ss/tax id
numbers have dashes and some do not. Some of the ss/tax

id numbers are
missing leading zero's. I am not able to change all of

them into a text
format.

How can I formatt them all so they will sort properly?

Thanks for any assistance out there.
.


Precious Pearl



"Jason Morin" wrote:

I'm not sure what form tax id's are supposed to take, but
to format all the SSN's correctly, try:

=TEXT(REPT("0",9-LEN(SUBSTITUTE(A1,"-","")))&A1,"000-00-
0000")

HTH
Jason
Atlanta, GA

-----Original Message-----
I am having problems with sorting social secuirity/tax

id numbers that were
dropped into excel from several different sources. Some

of the ss/tax id
numbers have dashes and some do not. Some of the ss/tax

id numbers are
missing leading zero's. I am not able to change all of

them into a text
format.

How can I formatt them all so they will sort properly?

Thanks for any assistance out there.
.



Precious Pearl

Thank you so much for your help. We have spent hours trying to get the
numbers to sort. Would this work as well with the tax id numbers by changing
the formula to read "00-0000000"?

"Jason Morin" wrote:

I'm not sure what form tax id's are supposed to take, but
to format all the SSN's correctly, try:

=TEXT(REPT("0",9-LEN(SUBSTITUTE(A1,"-","")))&A1,"000-00-
0000")

HTH
Jason
Atlanta, GA

-----Original Message-----
I am having problems with sorting social secuirity/tax

id numbers that were
dropped into excel from several different sources. Some

of the ss/tax id
numbers have dashes and some do not. Some of the ss/tax

id numbers are
missing leading zero's. I am not able to change all of

them into a text
format.

How can I formatt them all so they will sort properly?

Thanks for any assistance out there.
.




All times are GMT +1. The time now is 08:34 PM.

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