View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.programming
Dana DeLouis Dana DeLouis is offline
external usenet poster
 
Posts: 947
Default Changing For...Next index

With your test data beginning in A1, here is Excel 2007.

Sub Demo()
[A1:D10].RemoveDuplicates Array(1, 2, 3, 4), xlNo
End Sub

I think there are a few bugs in Excel with "RemoveDuplicates", and the
documentation is wrong on the default settings.
There are also SpecialCells techniques that can do it in 3 loops.

--
HTH :)
Dana DeLouis
Windows XP & Excel 2007


"Alan Beban" wrote in message
...
Bob,

I am most assuredly interested in your "asides". I have not infrequently
solved problems with programmatically changing the index value within a
loop, and I like to poke around about a practice that may be frowned on,
shunned, avoided, whatever, so I can make better judgments about when I
might be doing something stupid. If in the process I have a chance to
learn something more, great.

Thanks again,
Alan Beban

Bob Phillips wrote:
Alan,. . .
I am not sure what you are trying to get out of this discussion, whether
you just want some input on the manually adjusting indexes, or techniques
generally, but I hope this is helpful. If you are not interested in my
asides, just let me know.