Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have a spreadsheet that has numerical values in cells of different lengths,
ie xxx, xxxxxx, etc. I need to make all the values 6 characters long by adding or removing zeros at the beginning and therefore not altering the value. I then want it to appear as text rather than number. Can anyone help |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
If your value was in A1:
=TEXT(A1,"000000") -- Regards, Dave "Carrie" wrote: I have a spreadsheet that has numerical values in cells of different lengths, ie xxx, xxxxxx, etc. I need to make all the values 6 characters long by adding or removing zeros at the beginning and therefore not altering the value. I then want it to appear as text rather than number. Can anyone help |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Try someting like:
=IF(LEN(A1)<=6,TEXT(A1,"000000"),TEXT(RIGHT(A1,6), "000000")) HTH JG "Carrie" wrote: I have a spreadsheet that has numerical values in cells of different lengths, ie xxx, xxxxxx, etc. I need to make all the values 6 characters long by adding or removing zeros at the beginning and therefore not altering the value. I then want it to appear as text rather than number. Can anyone help |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
One way:
=REPT(0,6-LEN(A1)) & A1 HTH, Paul "Carrie" wrote in message ... I have a spreadsheet that has numerical values in cells of different lengths, ie xxx, xxxxxx, etc. I need to make all the values 6 characters long by adding or removing zeros at the beginning and therefore not altering the value. I then want it to appear as text rather than number. Can anyone help |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Return SEARCHED Column Number of Numeric Label and Value | Excel Worksheet Functions | |||
Delete A Word That Exceeds X Number Of Characters | Excel Worksheet Functions | |||
Change number (in text format) to numeric format | Excel Discussion (Misc queries) | |||
trim a string by specific number of characters | Excel Discussion (Misc queries) | |||
fill or truncate to a certain number of characters in a cell | Excel Worksheet Functions |