简体   繁体   中英

Fill one column from a list based on the value of another column


I have a sheet where one column has values either "delete" or empty . If it is delete, I need to fill another column randomly from one of these value: {"test1", "test2", "test3"} . If it is empty, leave empty. How can this be done?

试试这个:

=IF(A1="delete",CHOOSE(RANDBETWEEN(1,3),"test1","test2","test3"),"")

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM