ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Select a random value from a column of values (https://www.excelbanter.com/excel-programming/304449-select-random-value-column-values.html)

Paul Gupta

Select a random value from a column of values
 
Hi, I have never programmed Excel before, but do use it a fair amount,
including use of built-in formulae. I would like to be able to select
a random value among a group of values - is this possible?

So for example, in a spreadsheet I have in column A a list of names
from cell 1 to cell 20. then I want to pick a name from random from
that list. How would I do?

Any input would be appreciated.

-- Paul


PS I do not have visual Studio/VB installed on my machine.

Trevor[_7_]

Select a random value from a column of values
 
someone else will give you a simpler formula, but, if not, the following
will work:

=INDIRECT("A"&ROUND(RAND()*(20-1)+1,0))


"Paul Gupta" wrote in message
om...
Hi, I have never programmed Excel before, but do use it a fair amount,
including use of built-in formulae. I would like to be able to select
a random value among a group of values - is this possible?

So for example, in a spreadsheet I have in column A a list of names
from cell 1 to cell 20. then I want to pick a name from random from
that list. How would I do?

Any input would be appreciated.

-- Paul


PS I do not have visual Studio/VB installed on my machine.




Frank Kabel

Select a random value from a column of values
 
Hi
another way:
=INDEX(A1:A20,RANDBETWEEN(1,20))

--
Regards
Frank Kabel
Frankfurt, Germany

"Paul Gupta" schrieb im Newsbeitrag
om...
Hi, I have never programmed Excel before, but do use it a fair

amount,
including use of built-in formulae. I would like to be able to

select
a random value among a group of values - is this possible?

So for example, in a spreadsheet I have in column A a list of names
from cell 1 to cell 20. then I want to pick a name from random from
that list. How would I do?

Any input would be appreciated.

-- Paul


PS I do not have visual Studio/VB installed on my machine.



JE McGimpsey

Select a random value from a column of values
 
Or, if you don't want to rely on an Analysis Toolpak function:

=INDEX(A:A,RAND()*20+1)

In article ,
"Frank Kabel" wrote:

another way:
=INDEX(A1:A20,RANDBETWEEN(1,20))



All times are GMT +1. The time now is 12:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com