View Single Post
  #1   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.misc
Rick Rothstein \(MVP - VB\) Rick Rothstein \(MVP - VB\) is offline
external usenet poster
 
Posts: 2,202
Default Custom Fields with spaces

=REPLACE(REPT(" ",30),1,LEN(A1),A1)
...
=A1&REPT(" ",MAX(0,30-LEN(A1)))


Okay, that is another way to do it. My guess is that if we keep trying,
there are probably a few other ways to accomplish this. Are you proposing
that your formula is the better one to use for some reason (perhaps, it's
more efficient or faster)?


It's shorter.

It may be more efficient, depending on how REPLACE works vs concatenation.


Shorter... OK, I can buy that.

Rick