Re: removing blank entries from an array



j = lbound(ar) - 1
for i = lbound(ar) to ubound(ar)
if ar(i) <> "" then
j = j + 1
ar(j) = ar(i)
end if
Next
Redim Preserve ar(lbound(ar) to j)

--
Regards,
Tom Ogilvy


"TheIrishThug" <TheIrishThug.20b0wb_1135024501.6801@xxxxxxxxxxxxxxxxxxxxx>
wrote in message
news:TheIrishThug.20b0wb_1135024501.6801@xxxxxxxxxxxxxxxxxxxxxxxx
>
> i have an array of strings. i'm trying to make a function that will
> return the arry without blank entries.
>
> input would be: "text"/"words"/""/"more words"/""
> result woud be: "text"/"words"/"more words"
>
>
> --
> TheIrishThug
> ------------------------------------------------------------------------
> TheIrishThug's Profile:
http://www.excelforum.com/member.php?action=getinfo&userid=29682
> View this thread: http://www.excelforum.com/showthread.php?threadid=494693
>


.


Loading