如何在EXCEL中生成八位数的大写字母加数字的随机字符串?

2024年11月16日 18:42
有2个网友回答
网友(1):

=CONCATENATE(LOOKUP(RANDBETWEEN(1,31),{1,"A";2,"B";3,"C";4,"D";5,"E";6,"F";7,"G";8,"H";9,"I";10,"J";11,"K";12,"L";13,"M";14,"N";15,"P";16,"Q";17,"R";18,"S";19,"T";20,"U";21,"V";22,"W";23,"X";24,"Y";25,3;26,4;27,5;28,6;29,7;30,8;31,9}),LOOKUP(RANDBETWEEN(1,31),{1,"A";2,"B";3,"C";4,"D";5,"E";6,"F";7,"G";8,"H";9,"I";10,"J";11,"K";12,"L";13,"M";14,"N";15,"P";16,"Q";17,"R";18,"S";19,"T";20,"U";21,"V";22,"W";23,"X";24,"Y";25,3;26,4;27,5;28,6;29,7;30,8;31,9}),LOOKUP(RANDBETWEEN(1,31),{1,"A";2,"B";3,"C";4,"D";5,"E";6,"F";7,"G";8,"H";9,"I";10,"J";11,"K";12,"L";13,"M";14,"N";15,"P";16,"Q";17,"R";18,"S";19,"T";20,"U";21,"V";22,"W";23,"X";24,"Y";25,3;26,4;27,5;28,6;29,7;30,8;31,9}),LOOKUP(RANDBETWEEN(1,31),{1,"A";2,"B";3,"C";4,"D";5,"E";6,"F";7,"G";8,"H";9,"I";10,"J";11,"K";12,"L";13,"M";14,"N";15,"P";16,"Q";17,"R";18,"S";19,"T";20,"U";21,"V";22,"W";23,"X";24,"Y";25,3;26,4;27,5;28,6;29,7;30,8;31,9}),LOOKUP(RANDBETWEEN(1,31),{1,"A";2,"B";3,"C";4,"D";5,"E";6,"F";7,"G";8,"H";9,"I";10,"J";11,"K";12,"L";13,"M";14,"N";15,"P";16,"Q";17,"R";18,"S";19,"T";20,"U";21,"V";22,"W";23,"X";24,"Y";25,3;26,4;27,5;28,6;29,7;30,8;31,9}),LOOKUP(RANDBETWEEN(1,31),{1,"A";2,"B";3,"C";4,"D";5,"E";6,"F";7,"G";8,"H";9,"I";10,"J";11,"K";12,"L";13,"M";14,"N";15,"P";16,"Q";17,"R";18,"S";19,"T";20,"U";21,"V";22,"W";23,"X";24,"Y";25,3;26,4;27,5;28,6;29,7;30,8;31,9}),LOOKUP(RANDBETWEEN(1,31),{1,"A";2,"B";3,"C";4,"D";5,"E";6,"F";7,"G";8,"H";9,"I";10,"J";11,"K";12,"L";13,"M";14,"N";15,"P";16,"Q";17,"R";18,"S";19,"T";20,"U";21,"V";22,"W";23,"X";24,"Y";25,3;26,4;27,5;28,6;29,7;30,8;31,9}),LOOKUP(RANDBETWEEN(1,31),{1,"A";2,"B";3,"C";4,"D";5,"E";6,"F";7,"G";8,"H";9,"I";10,"J";11,"K";12,"L";13,"M";14,"N";15,"P";16,"Q";17,"R";18,"S";19,"T";20,"U";21,"V";22,"W";23,"X";24,"Y";25,3;26,4;27,5;28,6;29,7;30,8;31,9}))

网友(2):

可以用VBA实现