Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Text with repeating trailing spaces
I need to create a text string from several different values that I have
calculated, however I need the resulting string to be fixed width (ie. the first entry needs to be inserted followed by spaces to total 30 characters). I know it can be done as I did this previously, but forget how. Can anybody help? |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Text with repeating trailing spaces
=A1 & REPT(" ",30-LEN(A1))
-- Gary''s Student - gsnu200837 |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Text with repeating trailing spaces
=F5&REPT(" ",30-(LEN(F5)))
You haven't said what to do with remaining "several values" in the string but just keep '&'ing Gord Dibben MS Excel MVP On Mon, 9 Mar 2009 11:28:01 -0700, briancrosier wrote: I need to create a text string from several different values that I have calculated, however I need the resulting string to be fixed width (ie. the first entry needs to be inserted followed by spaces to total 30 characters). I know it can be done as I did this previously, but forget how. Can anybody help? |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Text with repeating trailing spaces
=left(a1&rept(" ",30),30)
Will truncate/pad the string in A1 at 30 characters. briancrosier wrote: I need to create a text string from several different values that I have calculated, however I need the resulting string to be fixed width (ie. the first entry needs to be inserted followed by spaces to total 30 characters). I know it can be done as I did this previously, but forget how. Can anybody help? -- Dave Peterson |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Text with repeating trailing spaces
Thnaks every body, it was the REPT function that I had forgotten.
"Dave Peterson" wrote: =left(a1&rept(" ",30),30) Will truncate/pad the string in A1 at 30 characters. briancrosier wrote: I need to create a text string from several different values that I have calculated, however I need the resulting string to be fixed width (ie. the first entry needs to be inserted followed by spaces to total 30 characters). I know it can be done as I did this previously, but forget how. Can anybody help? -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
trailing spaces | Excel Worksheet Functions | |||
Removing leading/trailing spaces | Excel Discussion (Misc queries) | |||
REMOVING TRAILING SPACES | Excel Discussion (Misc queries) | |||
remove trailing spaces | Excel Discussion (Misc queries) | |||
how do I remove empty spaces trailing a text string? | Excel Worksheet Functions |