View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Claus Busch Claus Busch is offline
external usenet poster
 
Posts: 3,872
Default Right justify a string

Hi Robert,

Am Fri, 8 Mar 2013 14:53:14 -0700 schrieb Robert Crandal:

s1 = "--------" ' 8 dash characters
s2 = "13"

After applying your functions, the result of s3
shoud be:

s3 = "------13" ' 6 dashes + '13' string


then you have to work with len(s1):
s1 = "--------"
s2 = "13"
s3 = Left(s1, Len(s1) - 2) & s2


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2