-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the Excel-dynamic-array-RSG wiki!
=Random_String_Generator(,,,,,,) (intMinANSI, intMaxANSI, intMinLength, intMaxLength, intCountOfStrings, strCaseSelection, strANSIRangeSelection)
You can control the output by selecting min/max ANSI, min/max string length, alpha case (Both, Upper, Lower) and/or a predefined range of characters (Alpha, Numeric, Alphanumeric, All). No parameter is “optional” but all have defaults so may be passed empty.
intMinANSI/intMaxANSI -- 1 to 255 intMinLength/intMaxLength - 1 to Excel limit on characters in a cell intCountOfStrings -- 1 to Excel limit on rows in a worksheet strCaseSelection -- "Both", "Upper", "Lower" strANSIRangeSelection -- "Alpha", "Numeric", "Alphanumeric", "All"
For example, one million strings of ASCII printing characters having length between 3 and 100 is written =Random_String_Generator(33,126,3,100,1000000,,)
Another example, five thousand strings of upper case letters fixed length 10 =Random_String_Generator(,,10,10,5000,”Upper”,”Alpha”)
In practice the formula's intermediate result is a single array of random characters within the user selected range having the selected count of rows and max string length count of columns. A second array is generated having random numbers between min/max string length. The first array is concatenated by row to contain the random count of characters specified in the second array, all other characters in the row are discarded.