2.在A2输入=IF(D$2
3.在D2输入=RAND()
4.在E2输入=VLOOKUP(1,A2:B26,2,0)
那么E2就是需要的随机数
或者
1.把这两列数据放在B2:C26单元格
2.在D2输入=RAND()
3.在E2输入=OFFSET(B2,(D$2>SUM(C$2:C2))+(D$2>SUM(C$2:C3))+(D$2>SUM(C$2:C4))+(D$2>SUM(C$2:C5))+(D$2>SUM(C$2:C6))+(D$2>SUM(C$2:C7))+(D$2>SUM(C$2:C8))+(D$2>SUM(C$2:C9))+(D$2>SUM(C$2:C10))+(D$2>SUM(C$2:C11))+(D$2>SUM(C$2:C12))+(D$2>SUM(C$2:C13))+(D$2>SUM(C$2:C14))+(D$2>SUM(C$2:C15))+(D$2>SUM(C$2:C16))+(D$2>SUM(C$2:C17))+(D$2>SUM(C$2:C18))+(D$2>SUM(C$2:C19))+(D$2>SUM(C$2:C20))+(D$2>SUM(C$2:C21))+(D$2>SUM(C$2:C22))+(D$2>SUM(C$2:C23))+(D$2>SUM(C$2:C24))+(D$2>SUM(C$2:C25)),)
那么E2就是需要的随机数
这是相当于把方法1中A列的数集中在了一起