Random cell from list

tottee

New Member
Joined
Feb 28, 2007
Messages
12
Hi,

I need to get random cases from a list of cases and is using this so far
=INDEX($A:$A;RANDBETWEEN(2;526))
That what is working fine as long as have not filtered.
What I would like to add is to only pick based on the name in Column 3, like if name =" john, paul, sean" as example, but I cant seem to figure it out

Right now as a work around I filter copy and paste in new sheet, would like to avoid that step
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
I suggest that you update your Account details (click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

Here are a couple of options that may be of use.

21 04 01.xlsm
ABCDEF
1CaseNameExcel 365Excel 2010+
2Case 1SeanCase 18Case 8
3Case 2Sean
4Case 3Ken
5Case 4Paul
6Case 5John
7Case 6Sean
8Case 7Ken
9Case 8John
10Case 9Sean
11Case 10Paul
12Case 11Paul
13Case 12Ken
14Case 13Bob
15Case 14John
16Case 15Bob
17Case 16Sean
18Case 17Paul
19Case 18Sean
20Case 19Paul
21Case 20Ken
22Case 21Sean
23Case 22John
24Case 23Ken
Random name
Cell Formulas
RangeFormula
E2E2=LET(a,FILTER(A2:A24,ISNUMBER(SEARCH("|"&C2:C24&"|","|John|Paul|Sean|"))),INDEX(a,RANDBETWEEN(1,ROWS(a))))
F2F2=INDEX(A:A,AGGREGATE(15,6,ROW(A2:A24)/ISNUMBER(SEARCH("|"&C2:C24&"|","|John|Paul|Sean|")),RANDBETWEEN(1,SUM((C2:C24="John")+(C2:C24="Paul")+(C2:C24="Sean")))))
 
Upvote 0

Forum statistics

Threads
1,214,919
Messages
6,122,259
Members
449,075
Latest member
staticfluids

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
Back
Top