Text with repeating trailing spaces

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?
 
G

Gord Dibben

=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
 
D

Dave Peterson

=left(a1&rept(" ",30),30)

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top