LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Random Selection

Another play to tinker with
Source data in cols A and B, from row2 down
In C2 is a DV to select the N inputs required, eg: 1,2,3,4,5 (say)

In D2:
=IF(COUNTIF($A$2:A2,A2)$C$2,"",ROW())

In E2:
=IF(ROWS($1:1)COUNT(D:D),"",INDEX(A:A,SMALL(D:D,R OWS($1:1))))

In F2:
=IF(E2="","",INDEX(B:B,MATCH(E2,A:A,0)+RANDBETWEEN (0,COUNTIF(A:A,E2)-1)))
Select D2:F2, copy down to the last row of source data. Minimize/hide away
col D. Cols E & F will return the desired results. Press F9 to regenerate
randomized results in col F.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"carl" wrote:
I have a table like this (actually much larger):

Stock Ticker
AAPL VAAAH
AAPL VAAMH
AAPL VAAAJ
AAPL VAAMJ
AAPL VAAAL
AAPL VAAML
AAPL VAAAN
AAPL VAAMN
AAPL VAAAP
C C OC
C C FC
C C RC
C C CR
C C OR
C C FR
C C RR
C C IE
C C UE
C C IS
C C US
C C IF
C C UF
C C IR
C C UR
C C ID


I would like to create a table like this:

Stock Ticker

AAPL VAAAJ
AAPL VAAMN
C C UE
C C IE


Where the entries in the table represent "N" (in this case 2) randomly
selected Stock-Ticker Pairs. I need the table to list out "N" of these
selections for each Stock in the original table. So, in the original table
there are 2 stocks (AAPL and C) thus the new table has 2 selections for AAPL
and 2 selections for C.

I hope I explained my problem clearly.

Thank you in advance.

 
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
Random selection method Renegade Excel Discussion (Misc queries) 3 February 8th 08 02:42 AM
Random Selection Craig Excel Worksheet Functions 3 September 27th 07 05:18 PM
Random Selection Cookie New Users to Excel 2 May 3rd 06 12:05 AM
Random Selection Cris Excel Worksheet Functions 2 October 16th 05 06:15 PM
How can I set up the random selection of a cell from within a ran. nybbac Excel Discussion (Misc queries) 5 January 1st 05 05:39 AM


All times are GMT +1. The time now is 07:06 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"