메인 컨텐츠로 가기

Excel에서 중복없이 난수를 생성하는 방법은 무엇입니까?

작가: 썬 최종 수정 날짜: 2020-04-22

많은 경우 Excel에서 난수를 생성하고 싶습니까? 그러나 숫자를 무작위 화하는 일반 공식을 사용하면 일부 중복 값이있을 수 있습니다. 여기에서는 Excel에서 중복없이 난수를 생성하는 몇 가지 트릭을 알려 드리겠습니다.

수식으로 고유 한 난수 생성

Kutools for Excel의 임의 데이터 삽입 (쉬운!)으로 고유 한 난수 생성 좋은 생각 3


화살표 블루 오른쪽 거품 수식으로 고유 한 난수 생성

Excel에서 고유 한 난수를 생성하려면 두 가지 수식을 사용해야합니다.

1. A 열과 B 열에 중복없이 난수를 생성해야한다고 가정하고 이제 셀 E1을 선택하고 다음 수식을 입력합니다. = RAND (), 다음을 누릅니다. 엔터 버튼 키, 스크린 샷 참조 :
문서 무작위화-반복 없음-1

2. 그리고 눌러서 전체 열 E를 선택합니다 Ctrl 키 + 스페이스 버튼 키를 동시에 누른 다음 Ctrl 키 + D 수식을 적용하는 키 = RAND () 전체 열 E. 스크린 샷 참조 :
문서 무작위화-반복 없음-2

3. 그런 다음 D1 셀에 필요한 난수의 최대 수를 입력합니다. 여기서는 1과 50 사이에서 반복되지 않고 난수를 삽입하고 싶으므로 D50에 1을 입력합니다.
문서 무작위화-반복 없음-3

4. 이제 A 열로 이동하여 A1 셀을 선택하고 다음 수식을 입력합니다. =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)))을 클릭 한 다음 채우기 핸들을 다음 열 B로 드래그하고 필요한 범위까지 채우기 핸들을 아래로 드래그합니다. 스크린 샷보기 :
문서 무작위화-반복 없음-4

이제이 범위에서 필요한 난수는 반복되지 않습니다.

참고 :

1. 위의 긴 수식에서 A1은 긴 수식을 사용하는 셀, D1은 난수의 최대 개수, E1은 수식을 적용한 열의 첫 번째 셀 = RAND (), 2는 삽입하려는 셀을 나타냅니다. 난수를 두 개의 열로 만듭니다. 필요에 따라 변경할 수 있습니다.

2. 모든 고유 번호가 범위에 생성되면 중복 셀이 공백으로 표시됩니다.

3.이 방법을 사용하면 1 번부터 시작하여 난수를 생성 할 수 있지만 두 번째 방법으로 난수 범위를 쉽게 지정할 수 있습니다.


화살표 블루 오른쪽 거품 Kutools for Excel의 임의 데이터 삽입으로 고유 한 난수 생성

위의 공식을 사용하면 처리하기가 너무 불편합니다. 하지만 함께 Excel 용 Kutools임의 데이터 삽입 기능을 사용하면 필요에 따라 고유 한 난수를 빠르고 쉽게 삽입 할 수 있으므로 많은 시간을 절약 할 수 있습니다.

시간은 단축되지만 생산성은 향상됩니다.

Excel 300-2019용 2003개 이상의 전문 도구 포함
첫 번째 버전 1.0은 2011 년에 출시되었으며 현재 버전 18.0입니다.
대부분의 Excel 일일 복잡한 작업을 몇 초 만에 해결하고 시간 절약
제한없는 30 일 무료 평가판

kte 包装 盒

설치 후 Excel 용 Kutools는 다음과 같이하십시오.(지금 Excel 용 Kutools 무료 다운로드!)

1. 난수를 생성하는 데 필요한 범위를 선택하고 쿠툴 > 끼워 넣다 > 임의 데이터 삽입. 스크린 샷보기 :

2. 에서 임의 데이터 삽입 대화 상자에서 정수 탭에서 필요한 숫자 범위를 ~ 텍스트 상자를 확인하고 고유 한 값 선택권. 스크린 샷보기 :

3. 클릭 Ok 난수를 생성하고 대화 상자를 종료합니다.

참고 :선택한 셀이 난수보다 많으면 중복 셀이 공백으로 표시됩니다.

또한 임의의 고유 날짜, 임의의 고유 시간을 삽입 할 수 있습니다. 임의 데이터 삽입. 무료 평가판을 받으려면 임의 데이터 삽입, 지금 바로 다운 론을 받아주세요!
무작위 데이터 삽입

팁.데이터를 무작위로 선택하거나 정렬하려면 Excel 용 Kutools를 사용해보십시오. 무작위로 범위 정렬 다음 스크린 샷에 표시된대로. 30 일 안에 제한없이 모든 기능을 사용할 수 있습니다. 지금 다운로드하여 무료 평가판을 받으십시오.

doc 무작위로 선택


화살표 블루 오른쪽 거품 중복없이 임의 데이터 삽입




워크 시트의 셀 범위에 여러 확인란 또는 단추를 빠르게 삽입

엑셀에서는 체크 박스 / 버튼을 한 번만 셀에 삽입 할 수 있지만, 동시에 체크 박스 / 버튼을 삽입해야하는 셀이 여러 개 있으면 번거 롭습니다. Excel 용 Kutools 강력한 유틸리티가 있습니다. 일괄 삽입 확인 박스 / 일괄 삽입 옵션 버튼 클릭 한 번으로 선택한 셀에 체크 박스 / 버튼을 삽입 할 수 있습니다.  30일 동안 모든 기능을 갖춘 무료 평가판을 보려면 클릭하세요!
문서 삽입 확인란 옵션 버튼
 
Excel 용 Kutools : 300 개 이상의 편리한 Excel 추가 기능으로 30 일 동안 제한없이 무료로 사용해 볼 수 있습니다.

최고의 사무 생산성 도구

🤖 Kutools AI 보좌관: 다음을 기반으로 데이터 분석을 혁신합니다. 지능형 실행   |  코드 생성  |  사용자 정의 수식 만들기  |  데이터 분석 및 차트 생성  |  Kutools 기능 호출...
인기 기능: 중복 항목 찾기, 강조 표시 또는 식별   |  빈 행 삭제   |  데이터 손실 없이 열이나 셀 결합   |   수식없이 반올림 ...
슈퍼 조회: 다중 기준 VLookup    다중 값 VLookup  |   여러 시트에 걸친 VLookup   |   퍼지 조회 ....
고급 드롭다운 목록: 드롭다운 목록을 빠르게 생성   |  종속 드롭다운 목록   |  다중 선택 드롭 다운 목록 ....
열 관리자: 특정 개수의 열 추가  |  열 이동  |  Toggle 숨겨진 열의 가시성 상태  |  범위 및 열 비교 ...
특색 지어진 특징: 그리드 포커스   |  디자인보기   |   큰 수식 바    통합 문서 및 시트 관리자   |  리소스 라이브러리 (자동 텍스트)   |  날짜 선택기   |  워크 시트 결합   |  셀 암호화/해독    목록으로 이메일 보내기   |  슈퍼 필터   |   특수 필터 (굵게/기울임꼴/취소선 필터링...) ...
상위 15개 도구 세트12 본문 도구 (텍스트 추가, 문자 제거,...)   |   50+ 거래차트 유형 (Gantt 차트,...)   |   40+ 실용 방식 (생일을 기준으로 나이 계산,...)   |   19 삽입 도구 (QR 코드 삽입, 경로에서 그림 삽입,...)   |   12 매출 상승 도구 (숫자를 단어로, 환율,...)   |   7 병합 및 분할 도구 (고급 결합 행, 셀 분할,...)   |   ... 그리고 더

Excel용 Kutools로 Excel 기술을 강화하고 이전과는 전혀 다른 효율성을 경험해 보세요. Excel용 Kutools는 생산성을 높이고 시간을 절약하기 위해 300개 이상의 고급 기능을 제공합니다.  가장 필요한 기능을 얻으려면 여기를 클릭하십시오...

상품 설명


Office Tab은 Office에 탭 인터페이스를 제공하여 작업을 훨씬 쉽게 만듭니다.

  • Word, Excel, PowerPoint에서 탭 편집 및 읽기 사용, Publisher, Access, Visio 및 Project.
  • 새 창이 아닌 동일한 창의 새 탭에서 여러 문서를 열고 만듭니다.
  • 생산성을 50% 높이고 매일 수백 번의 마우스 클릭을 줄입니다!
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