Text with repeating trailing spaces

  • Thread starter Thread starter briancrosier
  • Start date Start date
B

briancrosier

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?
 
=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
 
=left(a1&rept(" ",30),30)

Will truncate/pad the string in A1 at 30 characters.
 
Back
Top