Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
What excel snyntax and or function will add leading spaces
I have a requirement to have meet a specified field length. For example if
name field length is 7 and the name entered is SAM; what functions (operations, marcos, vb scripts) are available in excel that can automatically add either leading or trailing spaces to make the length equal to 7? |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
What excel snyntax and or function will add leading spaces
=A1&REPT(" ",7-LEN(A1))
"Sharon" wrote: I have a requirement to have meet a specified field length. For example if name field length is 7 and the name entered is SAM; what functions (operations, marcos, vb scripts) are available in excel that can automatically add either leading or trailing spaces to make the length equal to 7? |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
What excel snyntax and or function will add leading spaces
=LEFT(" ",7-LEN(A1))&A1
there are 7 spaces between opening and closing " or =A1&LEFT(" ",7-LEN(A1)) But you now have SAM in cole column and SAM____ in another You could use copy followed by Paste Special with Values specified to make the first column unneeded but this would be after all data was entered. If you want the change to happen on the fly, please post Q to the Programming group best wishes -- www.stfx.ca/people/bliengme "Sharon" wrote: I have a requirement to have meet a specified field length. For example if name field length is 7 and the name entered is SAM; what functions (operations, marcos, vb scripts) are available in excel that can automatically add either leading or trailing spaces to make the length equal to 7? |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
What excel snyntax and or function will add leading spaces
A couple mo
=right(rept(" ",7)&a1,7) =left(a1&rept(" ",7),7) Sharon wrote: I have a requirement to have meet a specified field length. For example if name field length is 7 and the name entered is SAM; what functions (operations, marcos, vb scripts) are available in excel that can automatically add either leading or trailing spaces to make the length equal to 7? -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
remove leading spaces | Excel Worksheet Functions | |||
how do I remove leading spaces and leave the remianing spaces w | Excel Worksheet Functions | |||
How keep Leading/Trailing spaces when save in Excel? | Excel Discussion (Misc queries) | |||
How do I add leading spaces to a value? | Excel Worksheet Functions | |||
Remove Leading Spaces | Excel Discussion (Misc queries) |