Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
JMRamsey
 
Posts: n/a
Default "Random selection between two cells"


Does anyone know how to randomly select a number from a column. I would
like to randomly select from a given field, not a random number between
two numbers. Thanks


--
JMRamsey
------------------------------------------------------------------------
JMRamsey's Profile: http://www.excelforum.com/member.php...o&userid=32799
View this thread: http://www.excelforum.com/showthread...hreadid=526212

  #2   Report Post  
Posted to microsoft.public.excel.misc
SteveG
 
Posts: n/a
Default "Random selection between two cells"


Do you mean return a random column number?

=RANDBETWEEN(COLUMN(A1),COLUMN(H20))

This re-calcs using F9 or anytime the workbook auto calcs.


Does that help?

Steve


--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=526212

  #3   Report Post  
Posted to microsoft.public.excel.misc
SteveG
 
Posts: n/a
Default "Random selection between two cells"


If you want to randomly retreive a value from a given range of cells say

A1:A10 you could try this.

=CHOOSE(RANDBETWEEN(1,10),A1,A2,A3,A4,A5,A6,A7,A8, A9,A10)

This works for up to 29 values. The RANDBETWEEN picks a random number
from the total and assigns the index of the CHOOSE function which then
retrieves the value in the corresponding cell. The cells you retrieve
data from do not need to be in order.

HTH

Steve


--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=526212

  #4   Report Post  
Posted to microsoft.public.excel.misc
Dana DeLouis
 
Posts: n/a
Default "Random selection between two cells"

=CHOOSE(RANDBETWEEN(1,10),A1,A2,A3,A4,A5,A6,A7,A8, A9,A10)

Another option to extract a random cell from A1:A10 might be something like
this:

=OFFSET(A1,RANDBETWEEN(0,9),0,1,1)

--
HTH. :)
Dana DeLouis
Windows XP, Office 2003


"SteveG" wrote in
message ...

If you want to randomly retreive a value from a given range of cells say

A1:A10 you could try this.

=CHOOSE(RANDBETWEEN(1,10),A1,A2,A3,A4,A5,A6,A7,A8, A9,A10)

This works for up to 29 values. The RANDBETWEEN picks a random number
from the total and assigns the index of the CHOOSE function which then
retrieves the value in the corresponding cell. The cells you retrieve
data from do not need to be in order.

HTH

Steve


--
SteveG
------------------------------------------------------------------------
SteveG's Profile:
http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=526212



  #5   Report Post  
Posted to microsoft.public.excel.misc
daddylonglegs
 
Posts: n/a
Default "Random selection between two cells"


Dana DeLouis Wrote:
=CHOOSE(RANDBETWEEN(1,10),A1,A2,A3,A4,A5,A6,A7,A8, A9,A10)


Another option to extract a random cell from A1:A10 might be something
like
this:

=OFFSET(A1,RANDBETWEEN(0,9),0,1,1)


..or not using addin functions....

=INDEX(A1:A10,RAND()*10+1)


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=526212



  #6   Report Post  
Posted to microsoft.public.excel.misc
Dana DeLouis
 
Posts: n/a
Default "Random selection between two cells"

=INDEX(A1:A10,RAND()*10+1)

Yep. Much nicer! Thanks. :)

--
HTH. :)
Dana DeLouis
Windows XP, Office 2003


"daddylonglegs"
wrote in message
news:daddylonglegs.257a1b_1143247802.0715@excelfor um-nospam.com...

Dana DeLouis Wrote:
=CHOOSE(RANDBETWEEN(1,10),A1,A2,A3,A4,A5,A6,A7,A8, A9,A10)


Another option to extract a random cell from A1:A10 might be something
like
this:

=OFFSET(A1,RANDBETWEEN(0,9),0,1,1)


.or not using addin functions....

=INDEX(A1:A10,RAND()*10+1)


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile:
http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=526212



  #7   Report Post  
Posted to microsoft.public.excel.misc
Tushar Mehta
 
Posts: n/a
Default "Random selection between two cells"

If you are looking for alternatives to those already suggested, you might
want to see
Random Selection
http://www.tushar-mehta.com/excel/ne...ion/index.html

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article ,
says...

Does anyone know how to randomly select a number from a column. I would
like to randomly select from a given field, not a random number between
two numbers. Thanks


--
JMRamsey
------------------------------------------------------------------------
JMRamsey's Profile:
http://www.excelforum.com/member.php...o&userid=32799
View this thread: http://www.excelforum.com/showthread...hreadid=526212


  #8   Report Post  
Posted to microsoft.public.excel.misc
Elkar
 
Posts: n/a
Default "Random selection between two cells"

You could use something like this:

=LARGE(A1:A10,RANBETWEEN(1,10))

This returns the nth largest number from the given range, where n is
randomly selected from 1 to the number of fields in your range.

HTH,
Elkar


"JMRamsey" wrote:


Does anyone know how to randomly select a number from a column. I would
like to randomly select from a given field, not a random number between
two numbers. Thanks


--
JMRamsey
------------------------------------------------------------------------
JMRamsey's Profile: http://www.excelforum.com/member.php...o&userid=32799
View this thread: http://www.excelforum.com/showthread...hreadid=526212


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Add "left align across selection" cell formatting Monty Analyst Excel Worksheet Functions 2 November 5th 08 03:17 PM
Insert Picture from dropdown selection Mike at Channel New Users to Excel 21 March 22nd 06 01:14 AM
First row in Selection range (first index of a cell) EXCEL VBA [email protected] Excel Worksheet Functions 1 March 20th 06 09:38 PM
Max Value in a column exclude selection - Excel VBA magix Excel Discussion (Misc queries) 3 November 5th 05 09:18 PM
Cell Selection after "Enter" Synectica Excel Discussion (Misc queries) 6 August 29th 05 09:55 PM


All times are GMT +1. The time now is 03:51 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"