PrefaceIn Function: Random Concatenation I provided a user-defined function (UDF) for worksheet use that would take a range of values (text or numeric), randomize them, and, finally, concatenate as few as 1 to all of them. To do this the function did the following
- Used an array of two fields
- Str held the value from the cell
- Val held a random number
- The Lbound was set to 1; Ubound to the number of cells in the range
OpportunityThat got me to thinking about putting them in order, after doing a random selection. I modified the function to do as above, with these exceptions:
- Added a sort routine on Str, after limiting the the number of fields to be included.
- Added Boolean parameters to turn randomizing and sorting by string on and off.
- Added Boolean parameter and code to allow for reverse sorting the results.
- Put the sort routines into separate functions