xlUser
09-29-2011, 08:16 AM
Hi,
I have the code below that takes a column of data from a range and pastes it elsewhere . Currently it does this in order of column, ie C, D, E, F etc
What I would like to do is randomise the order of column extraction. So it may extract column D first and then column K and then column C instead of C, D, E, F etc.
Is this posibble to do?
Thanks
XL
z = Sheets("X Variables").Cells(1, 200).End(xlToLeft).Column
For i = 3 To z
Range(Cells(1, i), Cells(1000, i)).Copy
Sheets("Search").Select
Range("B1").PasteSpecial Paste:=xlPasteValues
I have the code below that takes a column of data from a range and pastes it elsewhere . Currently it does this in order of column, ie C, D, E, F etc
What I would like to do is randomise the order of column extraction. So it may extract column D first and then column K and then column C instead of C, D, E, F etc.
Is this posibble to do?
Thanks
XL
z = Sheets("X Variables").Cells(1, 200).End(xlToLeft).Column
For i = 3 To z
Range(Cells(1, i), Cells(1000, i)).Copy
Sheets("Search").Select
Range("B1").PasteSpecial Paste:=xlPasteValues