I'm looking and kind of see what you did. Seems like you are creating sets of tables that are 5 cells and stringing them together. I don't understand completely though.
We may be doing this job repeatedly using random numbers other than 1-15 or different sets other that in 5.
Is there a way for me to change those values?
In the attached, table on left is as for your msg#1 (well, 60 instead of 6000).
Make sure From is always smaller then To
Count is <= difference between From and To
It only deals in whole numbers.
What it does:
Works out how many mini-tables are needed = Rows/Count
Creates a minitable in each row by:
Creating a mini-table with the necessary number of rows (difference between From and To) with all the values from From to To in.
Then it adds a random number column to all those rows.
Sorts that mini-table by the random number column.
Takes only the top Count rows of that mini-table.
Expands all those mini-tables and removes all the other columns.
The Excel365 formula that I have added builds a repeating block of the digits 1-15 and a set of random numbers for each block. Sorting shuffles the digits within their block and I finish by returning the first 5 digits for each block.