Here is a formula, not a format
=A1&REPT(" ",8-LEN(A1))
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email
"Owen Zhang" <(E-Mail Removed)> wrote in message
news:5f2b5c02-baf0-49ff-a43b-(E-Mail Removed)...
>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".