View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
xiang[_12_] xiang[_12_] is offline
external usenet poster
 
Posts: 1
Default help! how to delete useless rows in 2 dim array by VBA


hi, Tom
here is your code to remove blank entries from array
It works perfect in one-dim array. How could I make it work for 2-dim
array.
that is something I want.

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



--
xiang
------------------------------------------------------------------------
xiang's Profile: http://www.excelforum.com/member.php...o&userid=29489
View this thread: http://www.excelforum.com/showthread...hreadid=496567