Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Adding more space in a pulldown box? | Excel Discussion (Misc queries) | |||
Adding a space | Excel Worksheet Functions | |||
Adding a space in text | Excel Worksheet Functions | |||
Sorting and Adding Space | Excel Worksheet Functions | |||
Adding a space with =A59&B59 | Excel Worksheet Functions |