Hello,
As far as I know there is no "List" variable/class in VBA.
What I am currently trying to achieve is - I have a range of cells with unique values, I need to pick a few at random and cut them to another range. So far I have a "pick random non-empty cell" function and can cut the selected cell with no problems. However I am worried that cutting too many cells will leave a lot of "blanks" in the original range and with some bad seed (I re-initiate the seed before every run of the random function to ensure higher degree of randomization) it could take Excel a lot of iterations to pick a non-empty cell, which will, albeit slightly, stagger the application.
If I had a "List" variable, I could simply save the range values in it and delete the picked ones, ensuring the rest will shift to fill the gap. I can do the same by reordering the range, but I was wondering if there isn't a more elegant/professional/better approach to this.
Your help is appreciated!
Bookmarks