请教大佬,如何用公式,把原始数按已知要生成的个数,随机生成出来,谢谢! ...
F2供参考=TEXTJOIN(",",,MOD(AGGREGATE(15,6,RANDBETWEEN(ROW(1:99)^0,99)/1%+FILTERXML("<a><b>"&SUBSTITUTE(D2,",","</b><b>")&"</b></a>","//b"),ROW(INDIRECT("1:"&E2))),100)) C2数组公式:
=TEXTJOIN(",",,MOD(SMALL(IF(ISNUMBER(FIND(","&ROW($1:$99)&",",","&A2&",")),RANDBETWEEN(-V1:V99,99)/1%+ROW($1:$99)),ROW(INDIRECT("1:"&B2))),100))
=TEXTJOIN(",",,INDEX(EVALUATE("{"&A2&"}"),N(IF({1},MOD(SMALL(RANDBETWEEN(ROW(INDIRECT("1:"&B2))^0,B2)/1%+ROW(INDIRECT("1:"&B2)),ROW(INDIRECT("1:"&B2))),100)))))
WPS可行。。EXCEL将EVALUATE("{"&A2&"}") 此部分定义名称即可!
页:
[1]