MacAlexandreL
New Member
- Joined
- May 15, 2021
- Messages
- 4
- Office Version
- 365
- Platform
- Windows
Hi all,
I have to do 150 random draws to choose between 4 names, let's say A B C and D. But depending on the draw, sometimes there is only A and D participating, or A, C and D, etc. So the array is changing.
I know this formula could do it if the array was always the same: =INDEX(I8:L8,RANDBETWEEN(1,COUNTA(I8:L8)))
But I would like to use the formula on several rows, and sometimes in the array (I8:L8) there are some blank cells (if everyone is not participating. Indeed, there is a maximum of 4 people and a minimum of 1, depending on each row.
But when there isn't 4 names, the formula can retrieve a blank cell instead of a name. So I would like to know if I can add a criteria to the array (something to ignore when there is a blank cell).
As there are over 150 rows, I would like to know if there is a way to solve this problem or if I will have to adapt the array manually for each row...
Thank you for your precious help !
Alexandre
I have to do 150 random draws to choose between 4 names, let's say A B C and D. But depending on the draw, sometimes there is only A and D participating, or A, C and D, etc. So the array is changing.
I know this formula could do it if the array was always the same: =INDEX(I8:L8,RANDBETWEEN(1,COUNTA(I8:L8)))
But I would like to use the formula on several rows, and sometimes in the array (I8:L8) there are some blank cells (if everyone is not participating. Indeed, there is a maximum of 4 people and a minimum of 1, depending on each row.
But when there isn't 4 names, the formula can retrieve a blank cell instead of a name. So I would like to know if I can add a criteria to the array (something to ignore when there is a blank cell).
As there are over 150 rows, I would like to know if there is a way to solve this problem or if I will have to adapt the array manually for each row...
Thank you for your precious help !
Alexandre