View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default multiple validation

Hi,

I've done the code seperately so you can see what's happening. The
debub.print statement is to show you the elements being printed to the
immediate window and isn't necessary in your final code. In this case the
array elements ar in column A of sheet 2.


Sub Sonic()
Dim MyArray()
lastrow = Sheets("Sheet2").Cells(Rows.Count, "A").End(xlUp).Row
ReDim MyArray(1 To lastrow)
For x = 1 To lastrow
MyArray(x) = Sheets("Sheet2").Cells(x, 1).Value
Debug.Print MyArray(x)
Next
End Sub

Mike

"MJKelly" wrote:

Mike, that's excellent, works a treat. One further benefit for me
would be for the array to be populated with data from a range. Can
this be done?

Thanks again,
Matt