Choosing randomly from a list

Coffin_joe46

New Member
Joined
Sep 14, 2006
Messages
3
Hi,

I am trying to set up something in excel so I can randomly choose something from a list. At the moment I am using the formula:

=INDEX($A:$A,RANDBETWEEN(1,COUNTA($A:$A)),1)

I know this works if its in column A. If the list was in column A of Sheet 1, how would I make it work if I wanted the random thing to appear in Sheet 2 somewhere.

Thanks,

Andrew
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

PaddyD

MrExcel MVP
Joined
May 1, 2002
Messages
14,234
hi - welcome to the board!

=INDEX(sheet1!$A:$A,RANDBETWEEN(1,COUNTA(sheet1!$A:$A)),1)

..in general, you can use your mouse to select the ranges you need in a formula & excel will do the writing for you.
 

Forum statistics

Threads
1,141,097
Messages
5,704,313
Members
421,338
Latest member
Pepess

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top