Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
I have a column of Zip codes in an Excel spreadsheet. Some of the values are
4 digits in length and some are 5 digits in length. I need to have the column in text format, but since the format was numeric the leading zero disappears. I need a formula that determines that if the length of the value is 4 characters than add a leading zero. |
#2
![]() |
|||
|
|||
![]()
One way
=TEXT(A1,"00000") Regards, Peo Sjoblom "Calendar Control" wrote: I have a column of Zip codes in an Excel spreadsheet. Some of the values are 4 digits in length and some are 5 digits in length. I need to have the column in text format, but since the format was numeric the leading zero disappears. I need a formula that determines that if the length of the value is 4 characters than add a leading zero. |
#3
![]() |
|||
|
|||
![]()
Hi
With numeric code in cell A2 =TEXT(A2,"00000") With variable length numeric string as code in cell A2 =TEXT(VALUE(A2),"00000") Arvi Laanemets "Calendar Control" wrote in message ... I have a column of Zip codes in an Excel spreadsheet. Some of the values are 4 digits in length and some are 5 digits in length. I need to have the column in text format, but since the format was numeric the leading zero disappears. I need a formula that determines that if the length of the value is 4 characters than add a leading zero. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Seed numbers for random number generation, uniform distribution | Excel Discussion (Misc queries) | |||
How to format a number in Indian style in Excel? | Excel Discussion (Misc queries) | |||
When we enter a 16 digit number (credit card) the last digit chan. | Excel Discussion (Misc queries) | |||
GET.CELL | Excel Worksheet Functions | |||
single quote 10-digit number that has leading zeroes & then conca. | Excel Worksheet Functions |