View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Kashyap Kashyap is offline
external usenet poster
 
Posts: 131
Default Pick Ref# randomly on an average

Hi Max,

Proportional numbers what I got in col F are as below.

ABC 6
XYZ 6
MNO 4
UTV 3


But, whan I press F9 proportion differs each time as below..

1
4
2
4

4
5
2
0

7
1
3
0

1
6
2
2

I tried this for 15 random number out of 19.. What I need is that
proprotions should not change..

ABC 6
XYZ 6
MNO 4
UTV 3

Thanks..




"Max" wrote:

.. I'm not getting the expected result ..
.. need proportional number of items from each group without any
duplicate (proportional to the total size of each group)


Why, that's exactly what the formulas driven model accomplishes,
except for this "new" requirement: without any duplicate
(I did mention this point as a caveat earlier)

In the sample, one way to get a handle on this non-dups aspect is to have an
eyeball alert via a formula to count the unique ref#s generated in the final
o/p range M2:M6 equated to the number of unique ref#s required (5)

Place this in say N1:
=SUMPRODUCT((M2:M6<"")/COUNTIF(M2:M6,M2:M6&""))=5

N1 will return TRUE if there are no dups, FALSE otherwise
Format N1 in red, bold, larger font, whatever to make it outstanding

Just keep your eye trained on N1 as you tap F9 to regenerate
Stop tapping when you see TRUE in N1
You've got the required set of unique ref#s in M2:M6
Repeat to get the next set

Adapt the model set-up to suit your actuals

Still no high-fives? Click YES below
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:23,000 Files:370 Subscribers:66
xdemechanik
---