I need a Value Picker function
I would start by putting the data in a 2-D array, where the array
columns are the different locations and the array rows the different names.
This has the advantage that all the name rows go from 1 (or 0 if you want an
0-based array)
to whatever maximum, making it easier to use the Rand function.
Then all you have to do is loop through the columns (the locations) and
randomly pick
names from those columns, moving to the next column when you have picked 10%
of the column.
I am not sure if you have to randomly through the locations, but that is
problem either as the columns
have a fixed start and end as well.
The added benefit (although small as your numbers are small) is that working
with an array is faster than
working with sheet ranges.
RBS
"KarenB" wrote in message
...
I have a list of names (2500) spread over 55 different locations.
Col A = names Col B = location
I need to create a function where I randomly select 10% of the values in
each location.
Any ideas out there?
|