For Example:
In one case I'd like to generate 188 random numbers, all different, between 1 and 358. I need to disclude the following numbers:
177
198-202
206-226
257-263
322
346
337-341
327-335
Any ideas?
Thanks
For Example:
In one case I'd like to generate 188 random numbers, all different, between 1 and 358. I need to disclude the following numbers:
177
198-202
206-226
257-263
322
346
337-341
327-335
Any ideas?
Thanks
p.s. I have access to a newer version of excel if necessary
JVesuvius,
Welcome to the forum!
Attached is an example file based on the criteria you described.
There are two worksheets: 'Results' and 'Rand # Generator'
In sheet 'Rand # Generator' in column A is this formula from A1 to A309
In that same sheet in column B is the list of legal numbers (I just used autofill to create the list, and then manually removed the numbers that aren't allowed and made it a single list with no blank cells). Then just select the numbers in column A, click on A1 and press Ctrl+Shift+Down, and go to Data -> Sort -> A-Z -> you'll prompted to expand the selection, click OK. This will cause the randomized list to sort column B by what is in column A. Then just take the first 188 results.Please Login or Register to view this content.
In sheet 'Results' in cell A2 and copied down to cell A189 (for a total of 188 results) is this formula:
Please Login or Register to view this content.
Does that work for you?
Hope that helps,
~tigeravatar
Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks