Randbetween

aaronbeckman

New Member
Joined
Nov 18, 2015
Messages
3
I need help with the formula for assigning 20 randomized numbers (1-20) that can not repeat. Please help. Thank you!
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
In A1:A20, list the numbers 1 to 20

In another column (say B1:B20), enter =rand()

Sort both columns by column B.
 
Upvote 0
Excel 2010
A
List

<colgroup><col style="width: 25pxpx"><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]

[TD="align: center"]2[/TD]
[TD="align: right"]1[/TD]

[TD="align: center"]3[/TD]
[TD="align: right"]4[/TD]

[TD="align: center"]4[/TD]
[TD="align: right"]6[/TD]

[TD="align: center"]5[/TD]
[TD="align: right"]12[/TD]

[TD="align: center"]6[/TD]
[TD="align: right"]10[/TD]

[TD="align: center"]7[/TD]
[TD="align: right"]20[/TD]

[TD="align: center"]8[/TD]
[TD="align: right"]14[/TD]

[TD="align: center"]9[/TD]
[TD="align: right"]9[/TD]

[TD="align: center"]10[/TD]
[TD="align: right"]17[/TD]

[TD="align: center"]11[/TD]
[TD="align: right"]15[/TD]

[TD="align: center"]12[/TD]
[TD="align: right"]16[/TD]

[TD="align: center"]13[/TD]
[TD="align: right"]3[/TD]

[TD="align: center"]14[/TD]
[TD="align: right"]7[/TD]

[TD="align: center"]15[/TD]
[TD="align: right"]19[/TD]

[TD="align: center"]16[/TD]
[TD="align: right"]2[/TD]

[TD="align: center"]17[/TD]
[TD="align: right"]5[/TD]

[TD="align: center"]18[/TD]
[TD="align: right"]11[/TD]

[TD="align: center"]19[/TD]
[TD="align: right"]13[/TD]

[TD="align: center"]20[/TD]
[TD="align: right"]8[/TD]

[TD="align: center"]21[/TD]
[TD="align: right"]18[/TD]

</tbody>
Sheet12

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Array Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: #DAE7F5"]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: #DAE7F5"]A2[/TH]
[TD="align: left"]{=LARGE(ROW($1:$20)*NOT(COUNTIF($A$1:A1, ROW($1:$20))), RANDBETWEEN(1,21-ROW(A1)))}[/TD]
[/TR]
</tbody>[/TABLE]
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself[/TD]
[/TR]
</tbody>[/TABLE]



Then copy the formula in A2 and paste it through A21. You can generate a new list just by recalculating the sheet (F9).
 
Upvote 0

Forum statistics

Threads
1,223,264
Messages
6,171,081
Members
452,377
Latest member
bradfordsam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top