Loncat ke daftar isi utama

Bagaimana cara menghasilkan nomor acak tanpa duplikat di Excel?

Dalam banyak kasus, Anda mungkin ingin membuat angka acak di Excel? Tetapi dengan rumus umum untuk mengacak angka, mungkin ada beberapa nilai duplikat. Di sini saya akan memberi tahu Anda beberapa trik untuk menghasilkan angka acak tanpa duplikat di Excel.

Hasilkan angka acak unik dengan rumus

Hasilkan nomor acak unik dengan Kutools for Excel's Masukkan Data Acak (Mudah!) ide bagus3


panah gelembung kanan biru Hasilkan angka acak unik dengan rumus

Untuk menghasilkan angka acak unik di Excel, Anda perlu menggunakan dua rumus.

1. Misalkan Anda perlu menghasilkan angka acak tanpa duplikat ke dalam kolom A dan kolom B, sekarang pilih sel E1, dan ketik rumus ini = RAND (), Lalu tekan Enter kunci, lihat tangkapan layar:
doc-acak-tidak-ulangi-1

2. Dan pilih seluruh kolom E dengan menekan Ctrl + Space tombol secara bersamaan, lalu tekan Ctrl + D kunci untuk menerapkan rumus = RAND () ke seluruh kolom E. Lihat tangkapan layar:
doc-acak-tidak-ulangi-2

3. Kemudian di sel D1, ketikkan jumlah maksimum nomor acak yang Anda butuhkan. Dalam kasus ini, saya ingin memasukkan angka acak tanpa mengulang antara 1 dan 50, jadi saya akan mengetikkan 50 ke D1.
doc-acak-tidak-ulangi-3

4. Sekarang masuk ke Kolom A, pilih sel A1, ketikkan rumus ini =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))), lalu seret gagang isian ke kolom B berikutnya, dan seret gagang isian ke kisaran yang Anda butuhkan. Lihat tangkapan layar:
doc-acak-tidak-ulangi-4

Sekarang, dalam kisaran ini, bilangan acak yang Anda butuhkan tidak berulang.

Catatan:

1. Dalam rumus panjang di atas, A1 menunjukkan sel yang Anda gunakan rumus panjang, D1 menunjukkan jumlah maksimum nomor acak, E1 adalah sel kolom pertama yang Anda terapkan rumus = RAND (), dan 2 menunjukkan Anda ingin memasukkan nomor acak menjadi dua kolom. Anda dapat mengubahnya sesuai kebutuhan Anda.

2. Ketika semua nomor unik dibuat ke dalam rentang, sel yang berlebihan akan ditampilkan sebagai kosong.

3. Dengan metode ini, Anda hanya dapat menghasilkan angka acak mulai dari angka 1. Namun dengan cara kedua, Anda dapat dengan mudah menentukan kisaran angka acak.


panah gelembung kanan biru Hasilkan nomor acak unik dengan Kutools for Excel's Masukkan Data Acak

Dengan rumus di atas, terlalu banyak ketidaknyamanan yang harus ditangani. Tetapi dengan Kutools untuk Excel'S Masukkan Data Acak fitur, Anda dapat dengan cepat dan mudah untuk memasukkan nomor acak unik sesuai kebutuhan Anda yang akan menghemat banyak waktu.

Lebih Sedikit Waktu tetapi Produktivitas Lebih Tinggi

Termasuk 300+ alat profesional untuk Excel 2019-2003
Versi pertama 1.0 dirilis pada tahun 2011, sekarang adalah versi 18.0
Memecahkan sebagian besar tugas kompleks harian Excel dalam hitungan detik, hemat waktu Anda
Uji coba gratis 30 hari tanpa batasan apa pun

kte 包装 盒

Setelah menginstal Kutools for Excel, lakukan seperti di bawah ini:(Unduh Gratis Kutools untuk Excel Sekarang!)

1. Pilih kisaran yang Anda butuhkan untuk menghasilkan nomor acak, dan klik Kutools > Menyisipkan > Masukkan Data Acak. Lihat tangkapan layar:

2. Dalam Masukkan Data Acak dialog, pergi ke Bilangan bulat tab, ketikkan rentang angka yang Anda butuhkan ke dalam Dari dan Untuk kotak teks, dan ingat untuk mencentang Nilai-nilai unik pilihan. Lihat tangkapan layar:

3. klik Ok untuk membuat nomor acak dan keluar dari dialog.

Catatan:Jika sel yang Anda pilih lebih dari angka acak, sel yang berlebihan ditampilkan sebagai kosong.

Anda juga dapat memasukkan tanggal unik acak, waktu unik acak menurut Masukkan Data Acak. Jika Anda ingin memiliki uji coba gratis Masukkan Data Acak, tolong downloan sekarang!
masukkan data acak

Ketik.Jika Anda ingin memilih atau mengurutkan data secara acak, silakan coba gunakan Kutools for Excel's Sortir Rentang Secara Acak seperti yang ditunjukkan pada tangkapan layar berikut. Ini berfungsi penuh tanpa batasan dalam 30 hari, silakan unduh dan dapatkan uji coba gratis sekarang.

doc pilih secara acak


panah gelembung kanan biru Masukkan Data Acak Tanpa Duplikat




Sisipkan dengan cepat beberapa kotak centang atau tombol ke dalam rentang sel di lembar kerja

Di Excel, Anda hanya dapat memasukkan satu kotak centang / tombol ke dalam sel satu kali, akan merepotkan jika ada beberapa sel yang perlu disisipkan kotak centang / tombol pada saat yang bersamaan. Kutools untuk Excel memiliki utilitas yang kuat - Cek Sisipan Batch Kotak / Tombol Opsi Sisipkan Batch dapat memasukkan kotak centang / tombol ke dalam sel yang dipilih dengan satu klik.  Klik untuk uji coba gratis berfitur lengkap dalam 30 hari!
doc memasukkan tombol opsi kotak centang
 
Kutools for Excel: dengan lebih dari 300 add-in Excel yang praktis, gratis untuk dicoba tanpa batasan dalam 30 hari.

Alat Produktivitas Kantor Terbaik

🤖 Kutools AI Ajudan: Merevolusi analisis data berdasarkan: Eksekusi Cerdas   |  Hasilkan Kode  |  Buat Rumus Khusus  |  Analisis Data dan Hasilkan Grafik  |  Aktifkan Fungsi Kutools...
Fitur Populer: Temukan, Sorot, atau Identifikasi Duplikat   |  Hapus Baris Kosong   |  Gabungkan Kolom atau Sel tanpa Kehilangan Data   |   Putaran tanpa Formula ...
Pencarian Super: VLookup Beberapa Kriteria    VLookup Nilai Berganda  |   VLookup di Beberapa Lembar   |   Pencarian Fuzzy ....
Daftar Drop-down Lanjutan: Buat Daftar Drop Down dengan Cepat   |  Daftar Drop Down yang Bergantung   |  Multi-pilih Drop Down List ....
Manajer Kolom: Tambahkan Jumlah Kolom Tertentu  |  Pindahkan Kolom  |  Alihkan Status Visibilitas Kolom Tersembunyi  |  Bandingkan Rentang & Kolom ...
Fitur Unggulan: Fokus Kisi   |  Tampilan Desain   |   Bar Formula Besar    Manajer Buku Kerja & Lembar   |  Perpustakaan Sumberdaya (Teks otomatis)   |  Pemetik tanggal   |  Gabungkan Lembar Kerja   |  Enkripsi/Dekripsi Sel    Kirim Email berdasarkan Daftar   |  Filter Super   |   Filter Khusus (filter tebal/miring/coret...) ...
15 Perangkat Teratas12 Teks Tools (Tambahkan Teks, Hapus Karakter, ...)   |   50 + Grafik jenis (Gantt Chart, ...)   |   40+ Praktis Rumus (Hitung usia berdasarkan ulang tahun, ...)   |   19 Insersi Tools (Masukkan Kode QR, Sisipkan Gambar dari Jalur, ...)   |   12 Konversi Tools (Angka ke Kata, Konversi Mata Uang, ...)   |   7 Gabungkan & Pisahkan Tools (Lanjutan Gabungkan Baris, Pisahkan Sel, ...)   |   ... dan banyak lagi

Tingkatkan Keterampilan Excel Anda dengan Kutools for Excel, dan Rasakan Efisiensi yang Belum Pernah Ada Sebelumnya. Kutools for Excel Menawarkan Lebih dari 300 Fitur Lanjutan untuk Meningkatkan Produktivitas dan Menghemat Waktu.  Klik Di Sini untuk Mendapatkan Fitur yang Paling Anda Butuhkan...

Deskripsi Produk


Tab Office Membawa antarmuka Tab ke Office, dan Membuat Pekerjaan Anda Jauh Lebih Mudah

  • Aktifkan pengeditan dan pembacaan tab di Word, Excel, PowerPoint, Publisher, Access, Visio, dan Project.
  • Buka dan buat banyak dokumen di tab baru di jendela yang sama, bukan di jendela baru.
  • Meningkatkan produktivitas Anda sebesar 50%, dan mengurangi ratusan klik mouse untuk Anda setiap hari!
Comments (17)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
En la parte Genere números aleatorios únicos con fórmulas como hago para ampliar el numero de columnas pasar de 2 a 5 sin repetir los numeros segun la formula que ud puso: =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)))
This comment was minimized by the moderator on the site
Hello. I just found this site, and am trying to figure out best way to assign a new code to people. I'd like to assign a random code for people to use between 1000 and 65000, that does not equal any codes already assigned. I'd also like it to be formatted with 5 numbers (00000), but that's not a big deal if it doesn't take care of that. Any ideas on how to make this work? TIA :-)
This comment was minimized by the moderator on the site
Hi, Janel, why you donot try the Data Validation in Excel? It can only allow whole numbers between 1000 and 65000 to be entered in a cell range.
This comment was minimized by the moderator on the site
Help 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 :-)
This comment was minimized by the moderator on the site
Hi, 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
This comment was minimized by the moderator on the site
Hi. 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.
This comment was minimized by the moderator on the site
Hi there, did you ever manage to work out a solution to this, I've encountered the same issue. Any help would be appreciated.
This comment was minimized by the moderator on the site
Or you could use a sudoku setup.
This comment was minimized by the moderator on the site
How can I do the same thing with a custom list? Not numbers?
This comment was minimized by the moderator on the site
Your 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:
RANK.EQ(C1;$C$1:$C$100)

Column E is your output:
INDEX($A$1:$A$100;MATCH(D1;$B$1:$B$100;0))

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
IF(COUNTIFS($C$2:C2;C2)>0;D1+1;RANK.EQ(C2;$C$1:$C$100))
This comment was minimized by the moderator on the site
I 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
This comment was minimized by the moderator on the site
Sorry I have no idea, you can place this problem to our forum https://www.extendoffice.com/forum.html, maybe someone can help you.
This comment was minimized by the moderator on the site
After 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. #WAR Jiggly
This comment was minimized by the moderator on the site
Actually, if you have two equal values, rank will give the same value to both. Rank formula does return repeated rank values.
This comment was minimized by the moderator on the site
Manuel 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)
This comment was minimized by the moderator on the site
Hi, Base on Generate unique random numbers with formulas , How can I specify the starting point of a random number? Let's say I want to random "15 to 30".
This comment was minimized by the moderator on the site
Use RANDBETWEEN() to get random numbers lies between two numbers.
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations