Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I have a list of values that vary in length, but I need to convert all of
them to 10 characters with spaces, not 0's as prefixes. I have been able to use the text command to add 0's, but unable to add spaces. Thanks in advance for any help! -Chris |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi Chris,
=REPT(" ",10-LEN(A1))&A1 -- Kind regards, Niek Otten "Chris Brown" wrote in message ... I have a list of values that vary in length, but I need to convert all of them to 10 characters with spaces, not 0's as prefixes. I have been able to use the text command to add 0's, but unable to add spaces. Thanks in advance for any help! -Chris |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Try something like this:
For a value in A1 B1: =RIGHT(TEXT(A1," 0"),10) Note: That format includes 10 spaces before the 0. Does that help? *********** Regards, Ron XL2002, WinXP-Pro "Chris Brown" wrote: I have a list of values that vary in length, but I need to convert all of them to 10 characters with spaces, not 0's as prefixes. I have been able to use the text command to add 0's, but unable to add spaces. Thanks in advance for any help! -Chris |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi
Try something like this: =REPT(" ",10-LEN(A2))&A2 Once done, you'll have to Copy the range and then Edit/Paste Special/Values to fix the values. Hope this helps. Andy. "Chris Brown" wrote in message ... I have a list of values that vary in length, but I need to convert all of them to 10 characters with spaces, not 0's as prefixes. I have been able to use the text command to add 0's, but unable to add spaces. Thanks in advance for any help! -Chris |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Remove leading space | Excel Worksheet Functions | |||
Strip leading spaces from cell | Excel Worksheet Functions | |||
Stripping out imbedded spaces in a cell/row | Excel Worksheet Functions | |||
Remove Leading Spaces | Excel Discussion (Misc queries) | |||
remove spaces in text in excel | Excel Discussion (Misc queries) |