At 19:32 14/12/2007 +0000, Laurent Duperval wrote:
I want to pad my cells with preceding spaces if the content is less than X
characters.

For example, when I have these two cell contents

9999
xxx

I want it to be

   9999
    xxx

(width is 7 characters; nothing to do with display width). The idea is to
be able to export to a text file and have everything be the proper fixed
width. So everything is aligned properly.

Use:
     =RIGHT("      "&A1;7)
This concatenates a sufficient number of spaces to the front of the string and then selects the seven rightmost characters from the resulting string.

(I'm assuming that your strings of nines are text strings, not numbers, of course.)

I trust this helps.

Brian Barker

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to