Randomly selecting items from a list given their statistical likelihood #5

:) SOLUTION:

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

--
MACRE
-----------------------------------------------------------------------
MACRE0's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1084
View this thread: http://www.excelforum.com/showthread.php?threadid=26023

0
10/27/2004 8:42:11 PM
excel.misc 78881 articles. 5 followers. Follow

0 Replies
433 Views

Similar Articles

[PageSpeed] 54

Reply:

Similar Artilces:

RNDIS, WLK 1.5, crash
Moin, I test a RNDIS device which is connected via USB to the host. During power management tests the RNDIS driver part usb8023x.sys holds the IRP too long and the driver verifier complains about it with DRIVER_POWER_STATE_FAILURE (9f) A driver is causing an inconsistent power state. The tests fail on XP x86 SP 3 and Vista x86 SP2. Does MS provide a fixed driver ? Best regards, Stefan P.S.: The first analysis with WInDbg shows ******************************************************************************* * ...

Wrong unread count in inbox (1 is list but no there is no messages)
I'm trying to figure out why a user has this problem. The unread inbox count shows 1, even if there are no unread messages in the Inbox. Any ideas? Thanks in advance! Check your view (View, Current View, Customize Current View) and make sure there are no filters set. -- Patricia Cardoza Outlook MVP www.cardozasolutions.com Author, Special Edition Using Microsoft Outlook 2003 Author, Absolute Beginner's Guide to OneNote 2003 ***Please post all replies to the newsgroups*** "mr_gustav" <randy.riauka@saultc.on.ca> wrote in message news:17b1b01c418c3$e7e4aff0$a10128...

SharePoint (WSS) 2007 / Outlook 2007 - Alert
This is a multi-part message in MIME format. ------=_NextPart_000_00AD_01C70E47.83B45950 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable We have setup a SharePoint Server (WSS) 2007 and are using the alerting = functionality. After we changes stuff on WSS, an alert message is generated and sent to = an email account. This e-mail account is hosted on an Exchange 2003 server. When using Outlook 2007 to open the e-mail, we get: Cannot open this item. Wenn using OWA the e-mail can be opene fine. Does somehow have an explanation for th...

Exchange 5.5 to 2003 upgrade issue 3
We have upgraded our Exchange 5.5 server to 2003 and moved all the mailboxes and moved and re-homed the folders following the KB articles. We turned off the 5.5 services and for a week everything was working fine. Now for some reason the messages to the main distribution list is being sent to the old 5.5 server on a x400 protocol. How can I stop this and assure that the 2003 server is self contained so I can get rid of this server? ...

Changing Item #'s
Is it possible to change the item #'s after the item has already been entered? TMM: No there isn't in the "base" product, but MBS does have a tool that you can use called Item Modifier - this will allow you to change an Item number from one value to another. You can email this address below and they can answer any questions you have about the tool and can tell you what the cost of it is. mbsprofessionalservices@microsoft.com Hope that helps you out, JG "TMM" wrote: > Is it possible to change the item #'s after the item has already been entered? ...

Sorting Attendee Lists in Outlook 2003
Is there any way to sort attendees by either name or attendee status in Outlook 2003? I don't know how Microsoft could be so oblivious to the need for this feature. You can't even click on the column headers to sort, let alone print out a list of people sorted by accept and decline. Microsoft's online help system recommends Alt + PrntScreen???? How archaic is that? Is there anyone out there that can help me??? Thanks! ...

selected row count of list box
A2k Is there a way to get the selected row count of a list box dynamically as the user selects rows? Delphi has an event called "OnSelectionChanged" but Access is much more limited. I don't want the user to have to exit the list box or click a button or anything manual in order to see the # of rows he's selected. How can this be done? I know about "lstCusts.ItemsSelected.Count" but not sure what event to use it in to accomplish what I need. Thanks, Keith Never mind. I did this and it handles both mouse and keyboard selections: Private Sub lstCusts_AfterUpdat...

Importing spam list
Hi, I have a long list of spam email addresses that I want to import into outlook. How do I do this? Do they have to be separated by commas? Thaks, Paul Where is this spam list generated? What version of Outlook? Where do you propose to import them? --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. Due to the (insert latest virus name here) virus, all mail sent to my personal account will be deleted without reading. After searching google.groups.com and finding no answer, Paul Ellis asked: | Hi, | I have a long list of spam email addresses...

How do I setup an SMTP gateway / smart host for Exchange 5.5 internet bound mail
My current setup has a Windows NT 4.0 Exchange 5.5 server setting on our company LAN behind a Microsoft ISA Server. The Exchange server's Internet Mail Connector binds to (I assume this is the proper terms) port 25 on the ISA server for inbound and outbound Internet Mail. Our company has finally upgraded to a new Cisco Pix Firewall which we are able to setup a DMZ on. The suggestion by our ISP is to setup an SMTP gateway in the DMZ and have our internal Exchange server send mail to it destined for the Internet. I am aware that most of the work for making the connections from the SMTP ...

Deleted items folder in o2k3
The big boss refuses to empty or archive his deleted items, now holding some 25,000 messages and approaching 3 gigs in size for the deleted items folder alone. Does Outlook treat messages in the deleted items folder any differently than messages in other folders? Would it be better for him to never delete messages since he doesn't really want to delete them? It would be better to not delete them since Deleted Items... is for things you want to get rid of. "Wowbagger" <none> wrote in message news:uKyAPby2GHA.3656@TK2MSFTNGP04.phx.gbl... > The big boss refuses ...

Select all of a certain column across multiple worksheets
Is there an easy way to simultaneously select (or do a find-and-replace) on column H on every worksheet of an entire multi-sheet workbook, without having to select that column on each individual worksheet by hand? Charles Belov SFMTA Webmaster http://www.sfmta.com/webmaster Right-click on first sheet tab and "Select all sheets" In activesheet select the column............will be selected on all sheets. Gord Dibben MS Excel MVP On Mon, 24 Aug 2009 16:43:02 -0700, "Charles Belov" <invalid@invalid.invalid> wrote: >Is there an easy way to simultaneously se...

Data Validation List not showing
I'm using Excel 2003. My data validation lists have stopped working on one sheet in my workbook. It is working on all other sheets. I have googled the problem and found the following advice: 1. Make sure freeze panes is off.... check. 2. Select "Show All" under Tools->Options->View->Objects ... check. The problem remains. Any ideas? "Stopped working" doesn't do much to describe your problem. When you select one of the "stopped working" Data Validation cells, do you see the drop-down arrow to the right of the cell? When you select t...

manufacturing scrap not calculating on pick list and serial #'s no
I have entered my percentage of scrap on a MFG BOM and is seems to be calculating properly in the setup. When I release the components and add them to a pick list the scrap is not calculating. I also choose serial numbers and they do not carry thorugh and print on the pick list. Is there some setting that I have missed? -- Paula ...

Can't receive EMail #5
Keep getting this pop up along with 'server did not connect within 60 seconfs, do I want to wait A time-out occurred while communicating with the server. Account: 'Richard', Server: 'pop.east.cox.net', Protocol: POP3, Port: 110, Secure(SSL): No, Error Number: 0x800CCC19 Please reply using lmmurray@cox.net Thanks! Hi RASZ, please read this information from Microsoft http://support.microsoft.com/default.aspx?scid=kb;EN-US;813518 -- Ich habe nichts gemacht, gestern gings noch! Bitte in den Newsgroup antworten damit jeder etwas davon hat. Bravestar@Datenschutzminis...

Backing Up Outlook #5
How do I backup copies of all mye-mail folders? Hod do I backup all my contacts within the address book? Hello, You can do a total backup of your Outlook PST file using a back up program in Outlook. To download the ad in go to http://www.microsoft.com/downloads/details.aspx? FamilyId=8B081F3A-B7D0-4B16-B8AF- 5A6322F4FD01&displaylang=en If you have trouble email me at outlook@theblueedge.net Chris >-----Original Message----- >How do I backup copies of all mye-mail folders? Hod do I >backup all my contacts within the address book? >. > "Damon" <damo...

Need Help with drop down list with conditions...
I need help. I'm having a very difficult time creating a sequence of list which change based on the item selected on the main list, lets call it the index: The Index list, the first list, would define vendors. In this case Hotel Companies (e.g Hilton, Marriott, Sheraton). The following list, the 2nd list, would define properties, but the properties would vary based on which hotel company is selected (e.g. If Hilton, then "The Plaza, the Waldorf Astoria. If Marriott, then Marriott Marquis, Marriott Convention Center etc etc...) on list #1. And Last but not least, the 3rd list would...

cell selection gone crazy on Excel 2003
All of a sudden the mouse is acting like it is held down, and will not stop selecting cells. Have tried double clicking, playing with the Function keys, all sorts of things, but to no avail... don't want to force quit. Any clues? TIA, Geri Hi Geri, See David McRitchie's notes at: http://www.mvps.org/dmcritchie/excel/ghosting.txt --- Regards, Norman "Tweedie-Vaughan" <Tweedie-Vaughan@discussions.microsoft.com> wrote in message news:438C3854-C74C-410A-BD88-DAA146172E99@microsoft.com... > All of a sudden the mouse is acting like it is held down, a...

How do I import from LotusOrg 6.0?Import command only has 5.0
I am trying to import my calendar data from Lotus Org V6.X. Under the file command, it will only import from V5.X. Does anybody have any help for me since I would like to convert to Outlook from Lotus Organizer. Don Kiamie donalbert@mindspring.com In news:32C8F514-3EA5-4802-B1A4-F9C66E77293A@microsoft.com, DonAlbert <DonAlbert@discussions.microsoft.com> typed: > I am trying to import my calendar data from Lotus Org V6.X. Under > the file command, it will only import from V5.X. Does anybody have > any help for me since I would like to convert to Outlook from Lotus > ...

emails not showing up in deleted items until i do a find?
This just started happening a last week. A message comes in the Inbox and I click the delete key so delete it.. so far ok. then i go into the deleted items folder it's not visible. but if i do a find then they show up in the find box but still not in the folder. any ideas? this program makes me crazy sometimes *s* thanks starindy <anonymous@discussions.microsoft.com> wrote: > This just started happening a last week. A message comes > in the Inbox and I click the delete key so delete it.. so > far ok. then i go into the deleted items folder it's not > visible. b...

Select All Names
We have a form with a combo box and that combo box executes a query to find all of the records matching the user's name. The query derives that value from a form based parameter called vName. This is how the process works. 1. The user starts by selecting their name via a drop down list combo box on a dialog form. 2. That selection becomes the value of vName. 3. The user clicks OK and then moves to the data entry form. 4. On the data entry form, the user then clicks on another combo box which runs the aforementined query, which in turn uses the value of the variable vName to find ...

Problems with MFC list controls
I have a large list control with many inventory control items displayed within. When someone single clicks on an item, it displays information about that item in another part of the dialog. I have a three-fold problem, the master list has multiple columns in it, in order to make the selection work properly, only column 0 can be selected, is there a way to make a valid row selection if you select an item using any of the other columns? Second issue is the highlight of the selection. Only column 0 in the list control will highlight, is there a way to make the entire row highlight when an...

Outlook 2000 client Connection TimeOut w/ Ex5.5 server???
Hi, we have a really intriguing issue that started recently. Outlook users, when clicking on an item in the Mailbox, will get the message "Can't open this item. The operation could not be completed because of an error on the network. Try to log on to the network again, and then repeat the operation." The user will click OK, and usually will be able to open the same item in one or two attempts. The Envrionment: Ex5.5 SP4, Outlook 2000. It is ONLY the Windows98 users that is seeing this message, on NT and W2k stations, there's this occassional hour-glass when we click on an ...

IF statement based on True/False that activates a certain list box
I've been asked to create a formula that will react to either "yes" or "no" entered into a cell which will show options in another cell based on a certain list. Example: Cells D3:D5 contain the values Monday, Tuesday, Wednesday (list named BegWeek) Cells E3:E5 contain the values Thursday, Friday, Saturday (list named EndWeek) Cell A3 accepts either "yes" or "no" entry only from a list If A3 = "Yes" then B3 will = drop down list BegWeek If A3 = "No" then B3 will = drop down list End Week I don't even know if thi...

Assistance with ESEUTIL ans ISINTEG on Exchange 5.5
Folks, I need to perform some maintenance on a exchange 5.5 server. My users are complaining about speed, etc... First, GOOD BACKUP! Second, Take down all MS Exchange services Third, I want to run "ISINTEG -s EXCHANGE -FIX" correct? This will hopefully fix ant integrity issues. I am told to run it over and over until it comes up clean.. Once the integrity check is clean... Fourth, I run these three: eseutil /d /ds eseutil /d /ispriv eseutil /d /ispub If all goes well... Finally, startup MS Exchange services.. This is my plan. Any suggesstions? Comments? 1) GOOD BA...

How do I print a SINGLE POSTCARD on 5.5x4.25in stock?
I have a preprinted postcard that is 5.5" x 4.25". A standard postcard. I cannot for the life of me to get Publisher to print on this cardstock!! It keeps thinking the page is "LETTER 8.5x11". I have NO problems getting 4 cards (multiple addresses) to print on one page. But now I have the cards pre-printed and just want to mail-merge an address list onto them. How do I set this up? Because apparently, using the post card template of 5.5x4.25 (or even the 6x4) doesn't do it!!!!! Thanks for any insight. Jeff Jeff, File, PRINT SETUP Here select your stock si...