View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
John James
 
Posts: n/a
Default Fill blank cells with spaces


If you want to have all cells in column A filled with spaces up to 8
characters then try entering this formula in cell B1, and copy down.

=A1&REPT(" ",8-LEN(A1))

Note: If any cells in column A have more than 8 characters you will get
an error (#VALUE!). If you expect this then adjust the formula with an
if condition.

You can convert column B to values by copying these cells and then
edit-paste-special them as values. Only then would you be able to see
these extra spaces when you edit the cell. Presumably with a fixed
width font this will give the effect you are after.

You could also try automating this with a macro.


--
John James
------------------------------------------------------------------------
John James's Profile: http://www.excelforum.com/member.php...o&userid=32690
View this thread: http://www.excelforum.com/showthread...hreadid=524778