메뉴 건너뛰기

Dev tips

Etc. [excel] 엑셀 랜덤 문자열(쿠폰) 생성

taknim 2016.10.22 02:42 조회 수 : 170 추천:19

엑셀에서 랜덤 문자열 생성하기
쿠폰 등 생성할때 사용

SWITCH(RANDBETWEEN(1,2),1,CHAR(RANDBETWEEN(65,90)),2,RANDBETWEEN(0,9))
이 부분을 문자열 개수만큼 &로 붙이기

10자리 쿠폰 문자열 생성
=SWITCH(RANDBETWEEN(1,2),1,CHAR(RANDBETWEEN(65,90)),2,RANDBETWEEN(0,9))&SWITCH(RANDBETWEEN(1,2),1,CHAR(RANDBETWEEN(65,90)),2,RANDBETWEEN(0,9))&SWITCH(RANDBETWEEN(1,2),1,CHAR(RANDBETWEEN(65,90)),2,RANDBETWEEN(0,9))&SWITCH(RANDBETWEEN(1,2),1,CHAR(RANDBETWEEN(65,90)),2,RANDBETWEEN(0,9))&SWITCH(RANDBETWEEN(1,2),1,CHAR(RANDBETWEEN(65,90)),2,RANDBETWEEN(0,9))&SWITCH(RANDBETWEEN(1,2),1,CHAR(RANDBETWEEN(65,90)),2,RANDBETWEEN(0,9))&SWITCH(RANDBETWEEN(1,2),1,CHAR(RANDBETWEEN(65,90)),2,RANDBETWEEN(0,9))&SWITCH(RANDBETWEEN(1,2),1,CHAR(RANDBETWEEN(65,90)),2,RANDBETWEEN(0,9))&SWITCH(RANDBETWEEN(1,2),1,CHAR(RANDBETWEEN(65,90)),2,RANDBETWEEN(0,9))&SWITCH(RANDBETWEEN(1,2),1,CHAR(RANDBETWEEN(65,90)),2,RANDBETWEEN(0,9))