Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Adding a leading zero to a SSN

I am pulling SSN out of one of my systems and putting it in excel.
When it comes out of my AS/400 it does not have a leading zero if
needed. I need a have a formula that will add a zero to the begging
of a 8 character string if needed but if is in already 9 characters
long I need to leave it alone.

A1 has the SSN in text, which is how I need it. I need A2 to have the
SSN with the leading zero if not 9 characters long.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default Adding a leading zero to a SSN

=REPT("0",9-LEN(A21))&A21

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



wrote in message
oups.com...
I am pulling SSN out of one of my systems and putting it in excel.
When it comes out of my AS/400 it does not have a leading zero if
needed. I need a have a formula that will add a zero to the begging
of a 8 character string if needed but if is in already 9 characters
long I need to leave it alone.

A1 has the SSN in text, which is how I need it. I need A2 to have the
SSN with the leading zero if not 9 characters long.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,646
Default Adding a leading zero to a SSN

Apply custom format on cell A1, enter format code 00000000 (eight 0 digits)

Regards,
Stefi

ezt *rta:

I am pulling SSN out of one of my systems and putting it in excel.
When it comes out of my AS/400 it does not have a leading zero if
needed. I need a have a formula that will add a zero to the begging
of a 8 character string if needed but if is in already 9 characters
long I need to leave it alone.

A1 has the SSN in text, which is how I need it. I need A2 to have the
SSN with the leading zero if not 9 characters long.


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,646
Default Adding a leading zero to a SSN

Apply custom format on cell A1: enter format code 00000000 (eight 0 digit)

Regards,
Stefi

ezt *rta:

I am pulling SSN out of one of my systems and putting it in excel.
When it comes out of my AS/400 it does not have a leading zero if
needed. I need a have a formula that will add a zero to the begging
of a 8 character string if needed but if is in already 9 characters
long I need to leave it alone.

A1 has the SSN in text, which is how I need it. I need A2 to have the
SSN with the leading zero if not 9 characters long.


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Adding a leading zero to a SSN

I bet you meant nine 0's.

Or even Format|cells|number tab|special category|social security number
(to get 000-00-0000)

Stefi wrote:

Apply custom format on cell A1, enter format code 00000000 (eight 0 digits)

Regards,
Stefi

ezt *rta:

I am pulling SSN out of one of my systems and putting it in excel.
When it comes out of my AS/400 it does not have a leading zero if
needed. I need a have a formula that will add a zero to the begging
of a 8 character string if needed but if is in already 9 characters
long I need to leave it alone.

A1 has the SSN in text, which is how I need it. I need A2 to have the
SSN with the leading zero if not 9 characters long.



--

Dave Peterson


  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,646
Default Adding a leading zero to a SSN

Hi Dave,

No, I meant eight 0's, because cflarida wanted leading zeros up to 8
character length. In case of nine 0's string e.g. 1234567 would be displayed
as 001234567 and it's 9 character length instead of 8 character long
01234567. Did I misunderstand something?

Regards,
Stefi


Dave Peterson ezt *rta:

I bet you meant nine 0's.

Or even Format|cells|number tab|special category|social security number
(to get 000-00-0000)

Stefi wrote:

Apply custom format on cell A1, enter format code 00000000 (eight 0 digits)

Regards,
Stefi

❠ezt Ã*rta:

I am pulling SSN out of one of my systems and putting it in excel.
When it comes out of my AS/400 it does not have a leading zero if
needed. I need a have a formula that will add a zero to the begging
of a 8 character string if needed but if is in already 9 characters
long I need to leave it alone.

A1 has the SSN in text, which is how I need it. I need A2 to have the
SSN with the leading zero if not 9 characters long.



--

Dave Peterson

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Adding a leading zero to a SSN

I think so--but I've been wrong before.

"I need a have a formula that will add a zero to the begging (sic) of a 8
character string."


Stefi wrote:

Hi Dave,

No, I meant eight 0's, because cflarida wanted leading zeros up to 8
character length. In case of nine 0's string e.g. 1234567 would be displayed
as 001234567 and it's 9 character length instead of 8 character long
01234567. Did I misunderstand something?

Regards,
Stefi

Dave Peterson ezt *rta:

I bet you meant nine 0's.

Or even Format|cells|number tab|special category|social security number
(to get 000-00-0000)

Stefi wrote:

Apply custom format on cell A1, enter format code 00000000 (eight 0 digits)

Regards,
Stefi

❠ezt Ã*rta:

I am pulling SSN out of one of my systems and putting it in excel.
When it comes out of my AS/400 it does not have a leading zero if
needed. I need a have a formula that will add a zero to the begging
of a 8 character string if needed but if is in already 9 characters
long I need to leave it alone.

A1 has the SSN in text, which is how I need it. I need A2 to have the
SSN with the leading zero if not 9 characters long.



--

Dave Peterson


--

Dave Peterson
  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,646
Default Adding a leading zero to a SSN

Now I see, I haven't notice that the request was simply to display a SSN
formatted string. Not speaking English as mother tongue abbreviation SSN
didn't immediately bring to my mind its full meaning.
Stefi



Dave Peterson ezt *rta:

I think so--but I've been wrong before.

"I need a have a formula that will add a zero to the begging (sic) of a 8
character string."


Stefi wrote:

Hi Dave,

No, I meant eight 0's, because cflarida wanted leading zeros up to 8
character length. In case of nine 0's string e.g. 1234567 would be displayed
as 001234567 and it's 9 character length instead of 8 character long
01234567. Did I misunderstand something?

Regards,
Stefi

âžDave Peterson❠ezt Ã*rta:

I bet you meant nine 0's.

Or even Format|cells|number tab|special category|social security number
(to get 000-00-0000)

Stefi wrote:

Apply custom format on cell A1, enter format code 00000000 (eight 0 digits)

Regards,
Stefi

ââ¬Â ezt ÃÂ*rta:

I am pulling SSN out of one of my systems and putting it in excel.
When it comes out of my AS/400 it does not have a leading zero if
needed. I need a have a formula that will add a zero to the begging
of a 8 character string if needed but if is in already 9 characters
long I need to leave it alone.

A1 has the SSN in text, which is how I need it. I need A2 to have the
SSN with the leading zero if not 9 characters long.



--

Dave Peterson


--

Dave Peterson

  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Adding a leading zero to a SSN

Well, your writing in English is very good.



Stefi wrote:

Now I see, I haven't notice that the request was simply to display a SSN
formatted string. Not speaking English as mother tongue abbreviation SSN
didn't immediately bring to my mind its full meaning.
Stefi

Dave Peterson ezt *rta:

I think so--but I've been wrong before.

"I need a have a formula that will add a zero to the begging (sic) of a 8
character string."


Stefi wrote:

Hi Dave,

No, I meant eight 0's, because cflarida wanted leading zeros up to 8
character length. In case of nine 0's string e.g. 1234567 would be displayed
as 001234567 and it's 9 character length instead of 8 character long
01234567. Did I misunderstand something?

Regards,
Stefi

âžDave Peterson❠ezt Ã*rta:

I bet you meant nine 0's.

Or even Format|cells|number tab|special category|social security number
(to get 000-00-0000)

Stefi wrote:

Apply custom format on cell A1, enter format code 00000000 (eight 0 digits)

Regards,
Stefi

ââ¬Â ezt ÃÂ*rta:

I am pulling SSN out of one of my systems and putting it in excel.
When it comes out of my AS/400 it does not have a leading zero if
needed. I need a have a formula that will add a zero to the begging
of a 8 character string if needed but if is in already 9 characters
long I need to leave it alone.

A1 has the SSN in text, which is how I need it. I need A2 to have the
SSN with the leading zero if not 9 characters long.



--

Dave Peterson


--

Dave Peterson


--

Dave Peterson
  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Adding a leading zero to a SSN

On Feb 28, 11:36*am, Dave Peterson wrote:
Well, your writing in English is very good.





Stefi wrote:

Now I see, I haven't notice that the request was simply to display a SSN
formatted string. Not speaking English as mother tongue abbreviation SSN
didn't immediately bring to my mind its full meaning.
Stefi


Dave Peterson ezt *rta:


I think so--but I've been wrong before.


"I need a have a formula that will add a zero to the begging (sic) of a 8
character string."


Stefi wrote:


Hi Dave,


No, I meant eight 0's, because cflarida wanted leading zeros up to 8
character length. In case of nine 0's string e.g. 1234567 would be displayed
as 001234567 and it's 9 character length instead of 8 character long
01234567. Did I misunderstand something?


Regards,
Stefi


âžDave Peterson❠ezt Ã*rta:


I bet you meant nine 0's.


Or even Format|cells|number tab|special category|social security number
(to get 000-00-0000)


Stefi wrote:


Apply custom format on cell A1, enter format code 00000000 (eight 0 digits)


Regards,
Stefi


ââ¬Â ezt ÃÂ*rta:


I am pulling SSN out of one of my systems and putting it in excel.
When it comes out of my AS/400 it does not have a leading zero if
needed. *I need a have a formula that will add a zero to the begging
of a 8 character string if needed but if is in already 9 characters
long I need to leave it alone.


A1 has the SSN in text, which is how I need it. I need A2 to have the
SSN with the leading zero if not 9 characters long.


--


Dave Peterson


--


Dave Peterson


--

Dave Peterson- Hide quoted text -

- Show quoted text -


I tried that ad that works. I also got the following to work.
=TEXT(MOD(INT(A2/1),1000000000),"000000000")

If I have the -'s in how would I take them out? 000-00-0000 would
like it to return with 000000000



  #11   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Adding a leading zero to a SSN

=substitute(a1,"-","")
will return a text string
=--substitute(a1,"-","")
will return a number


wrote:

On Feb 28, 11:36 am, Dave Peterson wrote:
Well, your writing in English is very good.





Stefi wrote:

Now I see, I haven't notice that the request was simply to display a SSN
formatted string. Not speaking English as mother tongue abbreviation SSN
didn't immediately bring to my mind its full meaning.
Stefi


Dave Peterson ezt *rta:


I think so--but I've been wrong before.


"I need a have a formula that will add a zero to the begging (sic) of a 8
character string."


Stefi wrote:


Hi Dave,


No, I meant eight 0's, because cflarida wanted leading zeros up to 8
character length. In case of nine 0's string e.g. 1234567 would be displayed
as 001234567 and it's 9 character length instead of 8 character long
01234567. Did I misunderstand something?


Regards,
Stefi


âžDave Peterson❠ezt Ã*rta:


I bet you meant nine 0's.


Or even Format|cells|number tab|special category|social security number
(to get 000-00-0000)


Stefi wrote:


Apply custom format on cell A1, enter format code 00000000 (eight 0 digits)


Regards,
Stefi


ââ¬Â ezt ÃÂ*rta:


I am pulling SSN out of one of my systems and putting it in excel.
When it comes out of my AS/400 it does not have a leading zero if
needed. I need a have a formula that will add a zero to the begging
of a 8 character string if needed but if is in already 9 characters
long I need to leave it alone.


A1 has the SSN in text, which is how I need it. I need A2 to have the
SSN with the leading zero if not 9 characters long.


--


Dave Peterson


--


Dave Peterson


--

Dave Peterson- Hide quoted text -

- Show quoted text -


I tried that ad that works. I also got the following to work.
=TEXT(MOD(INT(A2/1),1000000000),"000000000")

If I have the -'s in how would I take them out? 000-00-0000 would
like it to return with 000000000


--

Dave Peterson
  #12   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,646
Default Adding a leading zero to a SSN

Thanks, Dave, that's really kind of you taking the trouble of appreciating my
English.
Stefi


Dave Peterson ezt *rta:

Well, your writing in English is very good.



Stefi wrote:

Now I see, I haven't notice that the request was simply to display a SSN
formatted string. Not speaking English as mother tongue abbreviation SSN
didn't immediately bring to my mind its full meaning.
Stefi

âžDave Peterson❠ezt Ã*rta:

I think so--but I've been wrong before.

"I need a have a formula that will add a zero to the begging (sic) of a 8
character string."


Stefi wrote:

Hi Dave,

No, I meant eight 0's, because cflarida wanted leading zeros up to 8
character length. In case of nine 0's string e.g. 1234567 would be displayed
as 001234567 and it's 9 character length instead of 8 character long
01234567. Did I misunderstand something?

Regards,
Stefi

ââ¬Å¾Dave Petersonââ¬Â ezt ÃÂ*rta:

I bet you meant nine 0's.

Or even Format|cells|number tab|special category|social security number
(to get 000-00-0000)

Stefi wrote:

Apply custom format on cell A1, enter format code 00000000 (eight 0 digits)

Regards,
Stefi

âââšÂ¬Ã ezt ÃÆÃÂ*rta:

I am pulling SSN out of one of my systems and putting it in excel.
When it comes out of my AS/400 it does not have a leading zero if
needed. I need a have a formula that will add a zero to the begging
of a 8 character string if needed but if is in already 9 characters
long I need to leave it alone.

A1 has the SSN in text, which is how I need it. I need A2 to have the
SSN with the leading zero if not 9 characters long.



--

Dave Peterson


--

Dave Peterson


--

Dave Peterson

  #13   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Adding a leading zero to a SSN

I enjoy reading the technical side of your posts, too <bg.

Stefi wrote:

Thanks, Dave, that's really kind of you taking the trouble of appreciating my
English.
Stefi

Dave Peterson ezt *rta:

Well, your writing in English is very good.



Stefi wrote:

Now I see, I haven't notice that the request was simply to display a SSN
formatted string. Not speaking English as mother tongue abbreviation SSN
didn't immediately bring to my mind its full meaning.
Stefi

âžDave Peterson❠ezt Ã*rta:

I think so--but I've been wrong before.

"I need a have a formula that will add a zero to the begging (sic) of a 8
character string."


Stefi wrote:

Hi Dave,

No, I meant eight 0's, because cflarida wanted leading zeros up to 8
character length. In case of nine 0's string e.g. 1234567 would be displayed
as 001234567 and it's 9 character length instead of 8 character long
01234567. Did I misunderstand something?

Regards,
Stefi

ââ¬Å¾Dave Petersonââ¬Â ezt ÃÂ*rta:

I bet you meant nine 0's.

Or even Format|cells|number tab|special category|social security number
(to get 000-00-0000)

Stefi wrote:

Apply custom format on cell A1, enter format code 00000000 (eight 0 digits)

Regards,
Stefi

âââšÂ¬Ã ezt ÃÆÃÂ*rta:

I am pulling SSN out of one of my systems and putting it in excel.
When it comes out of my AS/400 it does not have a leading zero if
needed. I need a have a formula that will add a zero to the begging
of a 8 character string if needed but if is in already 9 characters
long I need to leave it alone.

A1 has the SSN in text, which is how I need it. I need A2 to have the
SSN with the leading zero if not 9 characters long.



--

Dave Peterson


--

Dave Peterson


--

Dave Peterson


--

Dave Peterson
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
Keep Leading Zero Sean Timmons Excel Discussion (Misc queries) 11 December 28th 06 05:42 PM
Adding "0" as leading digits into cells in Excel Tippetue Excel Worksheet Functions 2 October 19th 06 12:14 AM
Leading zero Firefli Excel Discussion (Misc queries) 2 November 9th 05 05:27 PM
leading zero IRA Excel Discussion (Misc queries) 1 October 26th 05 06:47 PM
Adding Leading Zeros to Text Jenn Excel Discussion (Misc queries) 4 January 12th 05 06:51 PM


All times are GMT +1. The time now is 05:33 AM.

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

About Us

"It's about Microsoft Excel"