LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ray Ray is offline
external usenet poster
 
Posts: 267
Default Random selections with criteria

Hi -

I suppose the Subject sounds a bit contradictory, but there is a
method to the madness ....

What I'd like to do is set up a simple auditing tool to select
(mostly) random entries to be audited. Here's the setup:

Cell B1 - the % of entries (ie Lines) to be audited
Cell C1 - total number of entries audited (calc'd from A1, rounded UP)
Cell D1 - Invoice Limit (default = 1)
Cell E1 - Amount limit (default = $25,000)

Cell B5:B? -- invoice numbers (non-sequential)
Cell C5:C? -- # of invoices submitted to date
Cell D5:D? -- Amount of Invoice

The data comes as a 'dump' from another system and will vary in qty
from audit to audit. NOTE that not all of the audited entries should
be randomly chosen -- ALL entries where the # of Invoices (col c) is
<= the Invoice Limit (cell D1) should be chosen, as well as all
entries where the Invoice Amount (col D) is = the Amount Limit (cell
E1). The user will enter the % of entries to audit, with the code
first selecting the 'pre-defined' items and then randomly selecting
the rest. An example will help clarify...

Say there are 1000 entries, we want to audit 12% of the entries, using
the default Invoice & Amount limits. The sheet would look like this:
B1 = 12%
C1 = 120 (calculated from A1 x #_of_Entries)
D1 = 1
E1 = $25,000

# of Entries where # of Invoices <=Limit -- 15 entries
# of Entries where Invoice Amount = $25,000 -- 17 entries
(assume no overlap in these two ... code should select # of Invoices
first, THEN Invoice Amount)

The code would then RANDOMLY select 88 entries. Selected rows (ALL of
them) should have a * put in column A.

How would you code for this?

THANKS VERY MUCH ...!
br//ray
 
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
Making random and unique selections from a list Babymech Excel Discussion (Misc queries) 2 January 27th 09 09:39 PM
Random selections Kim Excel Worksheet Functions 2 April 22nd 08 07:09 PM
random number entry based on two criteria SSG QuarterMaster Excel Discussion (Misc queries) 0 October 5th 06 03:20 AM
Top Five selections based on sum of items meeting criteria Joe D Excel Worksheet Functions 2 November 20th 05 11:49 PM
Averaging Random Selections? Matt R Excel Programming 0 November 15th 05 05:06 PM


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