Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Adding a space?

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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Adding a space?

ary(0) = Space(Len(test1) - Len(ary(0))) & ary(0)


--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Sjakkie" wrote in message
...
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?



  #3   Report Post  
Posted to microsoft.public.excel.programming
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?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding more space in a pulldown box? jcolley05 Excel Discussion (Misc queries) 2 February 18th 08 11:46 PM
Adding a space eddie57[_2_] Excel Worksheet Functions 3 August 6th 07 06:08 PM
Adding a space in text MB Excel Worksheet Functions 6 May 19th 06 07:15 PM
Sorting and Adding Space Stewart Excel Worksheet Functions 2 November 16th 05 10:21 PM
Adding a space with =A59&B59 Jim Excel Worksheet Functions 1 May 17th 05 12:37 AM


All times are GMT +1. The time now is 11:32 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"