M
MACRE0
In case anyone in the future happens to stumble on to this post in th
future with similar issues, here's what I came up with:
where a6:a129 are the product names
c6:c129 are the relative frequency
selected 10,000 times in column k.
from which I added 6 columns of rand() along side k and had a ro
that selected the highest in each column and gave the correspondin
product name which was then value pasted, placed on the side repeatedl
for a random sample.
Sub UsePercentDistribution()
'
' Macro1 Macro
' Macro recorded 9/13/2004 by Douglas
'
Dim Stylecount
Dim rangestr As String
Dim refnum As Integer
refnum = 1
For x = 6 To 129
Range("a" + LTrim(Str(x))).Select
Selection.Copy
rangestr = "k" + LTrim(Str(refnum)) + ":k" + LTrim(Str(refnum
Cells(x, 3).Value))
refnum = refnum + Cells(x, 3).Value
Range(rangestr).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone
SkipBlanks _
:=False, Transpose:=False
Next x
End Su