- To post as a guest, your comment is unpublished.· 9 months agoHi, Anders, you need to list all names in column A, then in column B, apply formula =rand(), then specify 2 as the size in cell F2, now apply this formula =ROUNDUP(RANK(B3,$B$3:$B$19)/$F$2,0) in column C as below screenshot shown
- To post as a guest, your comment is unpublished.· 9 months agoHi. Thanks for your reply.
I understand you suggestions, but how do I achieve a setup where all students are assigned to maksimum number of workshops where 2 students are randomly assigned to first one workshop, then the second workshop, then the third workshop etc. etc. and to take this even further a student must not be matched with another student that he/she already have worked with. So when having 18 students I need "the system" to allocate all student to (in this case) 9 workshop (e.g. one workshop per week) and no student should be a student they have already worked with.
- To post as a guest, your comment is unpublished.· 6 months agoOr you could use a sudoku setup.
How to generate random number without duplicates in Excel?
In many cases, you may want to generate random numbers in Excel? But with the general formulas to randomize numbers, there may be some duplicate values. Here I will tell you some tricks to generate random numbers without duplicates in Excel.
To generate the unique random numbers in Excel, you need to use two formulas.
1． Suppose you need to generate random numbers without duplicates into column A and column B, now select cell E1, and type this formula =RAND(), then press Enter key, see screenshot:
2. And select the whole column E by pressing Ctrl + Space keys simultaneously, and then press Ctrl + D keys to apply the formula =RAND() to the whole column E. See screenshot:
3. Then in the cell D1, type the maximum number of your needed random number. In here case, I want to insert random numbers without repeated between 1 and 50, so I will type 50 into D1.
4. Now go to Column A, select cell A1, type this formula =IF(ROW()-ROW(A$1)+1>$D$1/2,"",RANK(OFFSET($E$1,ROW()-ROW(A$1)+(COLUMN()-COLUMN($A1))*($D$1/2),),$E$1:INDEX($E$1:$E$1000,$D$1))), then drag the fill handle to next column B, and drag down the fill handle to the range you need. See screenshot:
Now, in this range, the random numbers you need are no repeated.
1. In the above long formula, A1 indicates the cell you use the long formula, D1 indicates the maximum number of the random number, E1 is the first cell of column you apply formula =RAND(), and 2 indicates you want to insert random number into two columns. You can change them as your need.
2. When all the unique numbers are generated into the range, the redundant cells will be shown as blank.
3. With this method, you just can generate random number start from number 1. But with the second way, you can easily specify the random number range.
With above formulas, there are too much inconvenience to handle. But with Kutools for Excel’s Insert Random Data feature, you can quickly and easily to insert the unique random numbers as your need which will saves a lot of time.
After installing Kutools for Excel, please do as below:（Free Download Kutools for Excel Now!)
1. Select the range you need to generate random numbers, and click Kutools > Insert > Insert Random Data. See screenshot:
2. In the Insert Random Data dialog, go to the Integer tab, type the number range you need into the From and To text boxes, and remember to check Unique values option. See screenshot:
3. Click Ok to generate the random numbers and exit the dialog.
Quickly Insert multiple checkboxes or buttons into a range of cells in worksheet
|In Excel, you only can insert one checkbox/button into a cell once time, it will be troublesome if there are multiple cells needed to be inserted checkboxes/buttons at the same time. Kutools for Excel has a powerful utility -- Batch Insert Check Boxes / Batch Insert Option Buttons can insert checkboxes/buttons into the selected cells with one click . Click for full-featured free trial in 30-day!|
|Kutools for Excel: with more than 300 handy Excel add-ins, free to try with no limitation in 30 days.|
You are guest
or post as a guest, but your post won't be published automatically.
- To post as a guest, your comment is unpublished.· 9 months agoHelp anyone :-) This one I cannot figure out. At our school we often put together students in groups - 2 and 2 together for a number of working sessions. 9 in this case. There are 18 students (vary) in the class. What I am chasing is a formula that gives me a random result of who should work together in the 9 working sessions without having students meeting each other twice. So I need Excel to give me a result of 18 students spread across 9 working sessions and any student must not be match with another student twice. How the xxxx do I fix that? I have search all over the place for inspiration without luck. Any input is appreciated :-)
- To post as a guest, your comment is unpublished.· 1 years agoHow can I do the same thing with a custom list? Not numbers?
- To post as a guest, your comment is unpublished.· 1 years agoYour custom list is in Column A. Lets say it has 100 values and it is located in A1:A100
Column B is a counter:
1 for B1 and (B1+1) for B2:B100
Column C is a random list:
RAND() for C1:C100
Column D is a random rank based on the random list:
Column E is your output:
Note: There is virtually no chance of generating a duplicate value on column C since RAND() have billions of possibilities. But, if you really want to erase that chance you can type the following formula at column D2:D100
- To post as a guest, your comment is unpublished.· 1 years agoI need to create 5000 random numbers 1-90 no duplicates 30 columes I and using the formula =RAND() and =IF(ROW()-ROW(A$1)+1>$D$1/2,"",RANK(OFFSET($E$1,ROW()-ROW(A$1)+(COLUMN()-COLUMN($A1))*($D$1/2),),$E$1:INDEX($E$1:$E$1000,$D$1))) is there way that i could change the formula to extract the 5000 numbers
- To post as a guest, your comment is unpublished.· 1 years agoSorry I have no idea, you can place this problem to our forum https://www.extendoffice.com/forum.html, maybe someone can help you.
- To post as a guest, your comment is unpublished.· 3 years agoAfter about three hours of trying to completely understand the long complicated formula to generate random numbers without duplicates, I figured out a far simpler formula that has the same results. After you randomly generate the numbers in a column using the RAND() function, You can simplify the formula:=IF(ROW()-ROW(A$1)+1>$D$1/2,"",RANK(OFFSET($E$1,ROW()-ROW(A$1)+(COLUMN()-COLUMN($A1))*($D$1/2),),$E$1:INDEX($E$1:$E$1000,$D$1))) in cell a1 to =Rank(E1,$E$1:$E$50). Then if you would like 50 random generated "unique numbers." you simply drag the formula through column a to cell a50. It is a lot simpler. Thank you for answering my question regardless of the huge unneeded formula. If you did not have this website. I don't think I would have been able to solve my problem.
- To post as a guest, your comment is unpublished.· 1 years agoActually, if you have two equal values, rank will give the same value to both. Rank formula does return repeated rank values.
- To post as a guest, your comment is unpublished.· 1 years agoManuel Ramirez.
The formula RAND() has hundreds of billions of possibilities, but even so you can use a conditional to not repeat the numbers:
A1 = Rank(E1,$E$1:$E$50)
A2 = IF(COUNTIFS($E$1:E1;E1)>1;A1+1;Rank(E2,$E$1:$E$50)
- To post as a guest, your comment is unpublished.· 3 years agoHi, Base on [b]Generate unique random numbers with formulas [/b], How can I specify the starting point of a random number? Let's say I want to random "15 to 30".
- To post as a guest, your comment is unpublished.· 2 years agoUse RANDBETWEEN() to get random numbers lies between two numbers.