ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Randbetween help (https://www.excelbanter.com/excel-worksheet-functions/231440-randbetween-help.html)

tom

Randbetween help
 
am using Excel 2003 and I have a formula to randomly select employees for a
mandatory drug screen. I have 15 employees and I use the formula
=randbetween(1,15)"Mary","Bill")
etc. having to type in all 15 names. Is there a way to use a named range
with randbetween that refers to text names. I tried naming the range
employees and using =randbetween(1,15) employees . and it didn't work and
then I tried =randbetween("employees" and that didn't work. I even tried
=randbetween(b7:b22) and that failed also
any suggestions? I appreciate the help


T. Valko

Randbetween help
 
Drug tests are a waste of money!

List the employee names in a range of cells, say A1:A15.

Then:

=INDEX(A1:A15,RANDBETWEEN(1,15))

--
Biff
Microsoft Excel MVP


"Tom" wrote in message
...
am using Excel 2003 and I have a formula to randomly select employees for
a
mandatory drug screen. I have 15 employees and I use the formula
=randbetween(1,15)"Mary","Bill")
etc. having to type in all 15 names. Is there a way to use a named range
with randbetween that refers to text names. I tried naming the range
employees and using =randbetween(1,15) employees . and it didn't work and
then I tried =randbetween("employees" and that didn't work. I even tried
=randbetween(b7:b22) and that failed also
any suggestions? I appreciate the help




Tom Hutchins

Randbetween help
 
Try

=INDEX(employees,RANDBETWEEN(1,15))

Hope this helps,

Hutch

"Tom" wrote:

am using Excel 2003 and I have a formula to randomly select employees for a
mandatory drug screen. I have 15 employees and I use the formula
=randbetween(1,15)"Mary","Bill")
etc. having to type in all 15 names. Is there a way to use a named range
with randbetween that refers to text names. I tried naming the range
employees and using =randbetween(1,15) employees . and it didn't work and
then I tried =randbetween("employees" and that didn't work. I even tried
=randbetween(b7:b22) and that failed also
any suggestions? I appreciate the help



All times are GMT +1. The time now is 09:50 AM.

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