ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   what can I do to randomly select cells that contain text? (https://www.excelbanter.com/excel-worksheet-functions/215526-what-can-i-do-randomly-select-cells-contain-text.html)

gmadden2

what can I do to randomly select cells that contain text?
 
I have a spreadsheet of text cells ... I wish to randomly select a specified
number of cells from a specified column ... what must I do to accomplish that
random selection?

Sean Timmons

what can I do to randomly select cells that contain text?
 
assuming column A is your specified column:

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

This assumes you have 500 cells with values in them.

Copy and paste this formula the specified number of times, and you will get
the values in those random cells. Every time you edit any cell, the values
will change.

"gmadden2" wrote:

I have a spreadsheet of text cells ... I wish to randomly select a specified
number of cells from a specified column ... what must I do to accomplish that
random selection?


Glenn

what can I do to randomly select cells that contain text?
 
Including duplicates, which may not be desirable.

If your text values are in A1:A100, put =RAND() in B1:B100 and then in C1:C100
put the following:

=INDEX($A$1:$A$100,RANK(B1,$B$1:$B$100))

Copy the number of values desired from column C.


Sean Timmons wrote:
assuming column A is your specified column:

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

This assumes you have 500 cells with values in them.

Copy and paste this formula the specified number of times, and you will get
the values in those random cells. Every time you edit any cell, the values
will change.

"gmadden2" wrote:

I have a spreadsheet of text cells ... I wish to randomly select a specified
number of cells from a specified column ... what must I do to accomplish that
random selection?



All times are GMT +1. The time now is 08:37 AM.

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