View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
John Pierce John Pierce is offline
external usenet poster
 
Posts: 93
Default Simplifying code using array

Is there a way to say that MyArray(5) cannot equal any element of the
array, without listing each element, as below?
Do
MyArray(5) = Int(10 * Rnd)
Loop Until MyArray(5) < MyArray(4) And _
MyArray(5) < MyArray(3) And _
MyArray(5) < MyArray(2) And _
MyArray(5) < MyArray(1)