View Single Post
  #15   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson[_5_] Dave Peterson[_5_] is offline
external usenet poster
 
Posts: 1,758
Default Deleting an element in the middle of an array

John Walkenbach uses a bublesort to sort a collection at:
http://j-walk.com/ss/excel/tips/tip47.htm



Mike NG wrote:

On Sun, 13 Mar 2005 at 11:29:06, Tom Ogilvy (Tom Ogilvy
) wrote:
For P = 1 To c.Count
Debug.Print c(P)(0), c(P)(1)
Next P

is this the best way of doing it using for p = 1 to count? I thought
most arrays in excel were 0 based, and it was safer to use
for p in each c
even the Filter method used will create the resulting array as 0 based
(I presume even if you have option base 1 set)

the above would be very useful, as I need to do some basic sorting, you
know the type where you go

for i = 1 to c.count - 1
for j = i+1 to c.count
if c(i) c(j) then
swap c(i) and c(j) round
endif
next
next
--
Mike


--

Dave Peterson