user8553155
user8553155

Reputation: 41

Excel Formula for Random selection of contents in two non adjacent cells?

I have successfully used a formula for randomly selecting cell contents in a range of adjacent columns using the following formula:

=INDEX(L3:Q3, RANDBETWEEN(1, 6))

I would now like to randomly select cell contents from one of two columns which are not adjacent. How can I make adapt the below formula to accomplish this?

=INDEX(I3,R3, RANDBETWEEN(1, 2))

Upvotes: 1

Views: 158

Answers (1)

Scott Craner
Scott Craner

Reputation: 152505

Use CHOOSE:

=CHOOSE(RANDBETWEEN(1,2),I1,R1)

Upvotes: 2

Related Questions