當前位置:最新電影網 - 電影大全 - excel怎麽生成數字和字母混合的亂碼,最好是亂碼12位數的

excel怎麽生成數字和字母混合的亂碼,最好是亂碼12位數的

=CHOOSE(RANDBETWEEN(1,3),CHAR(RANDBETWEEN(48,57)),CHAR(RANDBETWEEN(65,90)),CHAR(RANDBETWEEN(97,122)))&……&CHOOSE(RANDBETWEEN(1,3),CHAR(RANDBETWEEN(48,57)),CHAR(RANDBETWEEN(65,90)),CHAR(RANDBETWEEN(97,122)))

註釋:1、RANDBETWEEN(1,3)表示在1、2、3中隨機選擇壹個數;

2、CHAR(RANDBETWEEN(48,57)),CHAR(RANDBETWEEN(65,90)),CHAR(RANDBETWEEN(97,122))分別表示隨機產生1~9,A~Z,a~z中的壹個符號;

3、CHOOSE函數表示隨機選擇1~9,A~Z,a~z中的壹個符號作為密碼的某壹位,該函數壹***使用12次,在把12個符號連起來成壹個12位密碼。

註意:如果嫌函數太長,可以分步進行,例如:

A1=CHAR(RANDBETWEEN(48,57))

B1=CHAR(RANDBETWEEN(65,90))

C1=CHAR(RANDBETWEEN(97,122))

D1=CHOOSE(RANDBETWEEN(1,3),A1,A2,A3)

把A1到D1全選,向下拉成12行

E1=D1&D2&D3&D4&D5&D6&D7&D8&D9&D10&D11&D12

12位的密碼存儲在E1中

按F9刷新壹次,生成壹個新的12位密碼