ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How do you pull a random cell (https://www.excelbanter.com/excel-worksheet-functions/78490-how-do-you-pull-random-cell.html)

fluffy

How do you pull a random cell
 
I have a list of ten names and need to pull one randomly. Is there a way
that I can put a number 1-10 in a cell and it would randomly return one of
the ten names? as an example if I put the number 2 in the cell it would
populate the cell next to it with Name 1. If I cleared it and put a 2 in
again it would populate the cell with Name 6 this time. Or is it possible to
use a button (i.e. spin) to generate the first number and that would populate
the name field?

Gary''s Student

How do you pull a random cell
 
You can use RANDBETWEEN().

in cell A1 put =RANDBETWEEN(1,10)
in cell B1 put:

=CHOOSE(A1,"tom","dick","harry","sam","max","mary" ,"betty","nigel","trevor","tony")
--
Gary's Student


"fluffy" wrote:

I have a list of ten names and need to pull one randomly. Is there a way
that I can put a number 1-10 in a cell and it would randomly return one of
the ten names? as an example if I put the number 2 in the cell it would
populate the cell next to it with Name 1. If I cleared it and put a 2 in
again it would populate the cell with Name 6 this time. Or is it possible to
use a button (i.e. spin) to generate the first number and that would populate
the name field?



All times are GMT +1. The time now is 11:14 AM.

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