Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel question 2

Status
Not open for further replies.

AlohaRoss

IS-IT--Management
May 8, 2009
1,200
TH
I am making a raffel sheet. Each sheet has 50 numbers from 1 -1000 with no duplication. For a total of 1000 possible choices.

I would like Excel to generate 20 sheets of 50 random numbers no duplicates. Then on seperate sheet have excel tell me by 1-1000 which of the 20 pages I will find that number.

as an example

Page 1 has
3 5 501 652 75 on the first line

then on second sheet
it will list
#3 page 1
#5 Page 1
#75 Page 1
#501 Page 1
#652 Page 1
sheet 2 will be in numerical order. 1-1000 in first coloum and 1-20 to define which sheet.

I have Excel 2021, would be nice to be backwards compatile to office 2013 or Google sheets

AlohaRoss
An Aloha POS 3rd Party support Solution company.
We answer when they don't
reddit : rossabout
 
Your requirements are pretty convoluted, IMO.
Simple Excel file as an example may be nice.

There is a build-in function in Excel: RANDBETWEEN that could come handy, and you can even play With No Duplicates for a start.

---- Andy

"Hmm...they have the internet on computers now"--Homer Simpson
 
aloha, think about it.

ONE SHEET. Usually, when you add sheets you needlessly complicate things.

Using the functions that Andy suggested all on one sheet in one table:

Random Number in Column A
No Duplicates in Column B
Group Number in Column C (1 to 20)

Make it a Structured Table and then you can FILTER on Group Number to see the 50 No Duplicates for that group.

Be sure that once you have generated Random Numbers and No Duplicates that you COPY n PASTE SPECIAL--VALUES to remove the formulas.

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
"The most incomprehensible thing about the universe is that it is comprehensible" A. Einstein

You Matter...
unless you multiply yourself by the speed of light squared, then...
You Energy!
 
I would create helper 'separate' sheet with two column table:
- A1:B1: headers,
- col. A, A2:A1001: sequential numbers 1-1000,
- col. B, B2:B1001: formula =RAND(),
and col. D:
- D2:D51: 1,
- D52:D101: 2
- D102:D151: 3,
- etc, till D1001 (20).

To distribute numbers between sheets, reference numbers from col. A:
- sheet 1: 'separate'!A2:A51
- sheet 2: 'separate'!A52:A101
- etc.

Now the clue, to (pseudo)randomize numbers in col. A, sort col. B in 'separate' sheet, references and col. D will not be sorted. Sheet 1-20 will contain random numbers, cols A and D have numbers (not sorted) and pages, where they can be found.


combo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top