Thread: Adding a space?
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default Adding a space?

s = arr(lbound(arr))
if len(s) < len(test1) then
s = s & string(len(test1)-len(s)," ")
arr(lbound(arr)) = s
end if

--
Regards,
Tom Ogilvy


"Sjakkie" wrote:

I have an array which holds names and details i have been able to set "test1"
to the longest name in the array and add 5 more spaces. I then want it to
lookat the first value in the array and count howmany characters it is if it
is less than that that was stored in "test1" i want it to add spaces on
untill it reaches the same ammount as "test1" is this possible?