Reputation: 1
I was wondering if somebody knows How to choose a cell of a column from multiple columns in Excel sheet? example :
A B C 0 1 2
I want a number to be selected randomly between (0-2) Thanks
Upvotes: 0
Views: 3561
Reputation: 46341
Generically to select a cell randomly from any range you can use this formula
=INDEX(range,ROWS(range)*RAND()+1,COLUMNS(range)*RAND()+1)
that will work for any size contiguous range
Upvotes: 0
Reputation: 10682
=RAND() * (b−a) + a does randomization, as does =RANDBETWEEN(a,b)
The other thing you would need is =CONCATENATE( text1, text2, ... text255 )
so, what you would do is be like =concatenate('a',randbetween(0,2)) would get you a random cell in the A column. If it was cross the columns, do that for b, c. If it is random letters 2, i need to look a bit more.
YOu just need to select that cell now. Im sure there is a way to access that cell from that contents. I am looking up http://excel.bigresource.com/Choose-Return-Cell-Based-On-Text-In-Another-JQVjkhos.html#oYwiAspH and will edit in a second.
Upvotes: 0
Reputation: 149287
I want a number to be selected randomly between (0-2)
If you are looking for an Excel formula then you can use
=RANDBETWEEN(0,2)
If you are trying combinations from A1 to C2
then you can try this. Omitting 0
as there is no cell range which is A0
, B0
, C0
=CHAR(RANDBETWEEN(65,67)) & RANDBETWEEN(1,2)
This formula will give you results from A1
, A2
, B1
, B2
, C1
, C2
Upvotes: 2