View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default 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