Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default select random sample of records in a filtered list

I have an excel 2007 table that contains records of financial transactions. I
want to select a sample of n records (usually 10 but may vary) from a subset
of the transactions. For example, from a list that contains all transactions
for the entire year:

Randomly select 10 records for the month of September with a transaction
amount greater than $50,000 from the list.

Where the list would contain one column with the month and another column
with the transaction amount.

Any thoughts on how I can accomplish this?

Thanks,

David


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,393
Default select random sample of records in a filtered list

David,
Here is how I would do it.
Let's say you data in in A1:K2000 and the date field is in column A, dollar
field in B
Insert five rows a top and three columns to left
Starting in A1:
Month to find 10 'September is 10th month
Amount to find 50000

Random Month Amount heading from your data 'Headers so Data |
Filter works
In A5: =randbetween(1,1000),
In B5 =MONTH(D5)=$B$1 ' your date field is now in
column D
In C5 = E5=$B$2 ' you dollar filed in now
in E

Copy A5:C5 down to match number of rows of your data
Use Copy & Paste Special to turn A entries from formulas to values
Select all the data and allpy Data | Filter
Filter the data by sorting on A, and display only rows with B and C values
of TRUE
Select and copy the top N (your 10 random records)

best wishes
--
Bernard Liengme
http://people.stfx.ca/bliengme
Microsoft Excel MVP

"David3553" wrote in message
...
I have an excel 2007 table that contains records of financial
transactions. I
want to select a sample of n records (usually 10 but may vary) from a
subset
of the transactions. For example, from a list that contains all
transactions
for the entire year:

Randomly select 10 records for the month of September with a transaction
amount greater than $50,000 from the list.

Where the list would contain one column with the month and another column
with the transaction amount.

Any thoughts on how I can accomplish this?

Thanks,

David


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,180
Default select random sample of records in a filtered list

Excel 2007
With Table, PivotTable
http://www.mediafire.com/file/mc11wj...11_25_09a.xlsx
http://c0444202.cdn.cloudfiles.racks...11_25_09a.xlsx
Reply
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
Select a random sample IPMS Excel Discussion (Misc queries) 2 January 7th 07 02:54 AM
How do I select the first cell of a filtered list? Shane Moore Excel Worksheet Functions 2 August 15th 06 02:18 PM
Select data in filtered list Stephen Rainey Excel Discussion (Misc queries) 2 July 28th 06 12:38 PM
How do I create a random sample from a list? swrath Excel Worksheet Functions 1 December 23rd 05 03:32 PM
How do I pull a random sample of people from a list in excel? PM Excel Worksheet Functions 6 November 29th 05 04:41 AM


All times are GMT +1. The time now is 09:27 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"