标签: excel vba excel-vba excel-2007 excel-formula
我有一张表格,其中一列的值为"delete"或empty。如果是删除,我需要从其中一个值中随机填充另一列:{"test1", "test2", "test3"}。如果是空的,请留空。怎么办呢?
"delete"
empty
{"test1", "test2", "test3"}
答案 0 :(得分:2)
试试这个:
=IF(A1="delete",CHOOSE(RANDBETWEEN(1,3),"test1","test2","test3"),"")