I need to have a format of all the cells of selected row to be 8
characters and if the word of the cell is less than 8 characters,
then
padding with space. For example, if I enter "ABC" in one of the cells
of the row, then the format will automatically become "ABC ",
which 5 spaces automatically appended to "ABC".
Bernard Liengme - 06 Mar 2008 20:51 GMT
Here is a formula, not a format
=A1&REPT(" ",8-LEN(A1))
best wishes

Signature
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email
>I need to have a format of all the cells of selected row to be 8
> characters and if the word of the cell is less than 8 characters,
> then
> padding with space. For example, if I enter "ABC" in one of the cells
> of the row, then the format will automatically become "ABC ",
> which 5 spaces automatically appended to "ABC".
Henn Sarv - 07 Mar 2008 07:24 GMT
You can use custom format in cell
like
@" "
then the entry is allways FORMATED (as You requested) with 5 spaces after
But You never "see" them 5 spaces without aligning cells to right
Henn
>I need to have a format of all the cells of selected row to be 8
> characters and if the word of the cell is less than 8 characters,
> then
> padding with space. For example, if I enter "ABC" in one of the cells
> of the row, then the format will automatically become "ABC ",
> which 5 spaces automatically appended to "ABC".