Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default How to sample data without returning duplicates?

Thanks! That solved both problems at the same time. I know about the rand()
function, but it never occurred to me to use it in this way. Thanks again!

"joeu2004" wrote:

On Aug 7, 8:38 am, Ralph E Brown <Ralph E
wrote:

1) Most important is when I run a sample of my range, the process will
return duplicate values in the sample.
[....] Is there a way to prevent this, so that every value returned appears
only once in the sample?

2) The data I want to sample is alpha, not numeric. However the Sampling
feature apparently only works with numeric input data. How can I get around
this limitation.


There are at least two common approaches. Arguably, the simplest one
is as follows....

Assume your data is in one column. In each cell in an adjacent
column, put the formula =RAND(). Note: The value of those cells will
change every time you modify the worksheet. Sigh. No matter: the
actual values do not matter, only that they are random.

Now select the range that includes your data and the adjacent column
of random values. Click on Data Sort to sort the random column.
This will reorder your data as well. If you select the first "n" of
the data column, it will be random without duplication (assuming all
of your data are unique).


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
can i do a random sample with non-numeric data? Kyeria Excel Discussion (Misc queries) 1 May 9th 07 10:51 PM
Help with Pulling Sample Data excelmad Excel Discussion (Misc queries) 1 February 1st 07 04:35 AM
Selecting a Random Sample of 15 from a Large data set RMort Excel Worksheet Functions 6 December 22nd 06 05:09 PM
How do I sample hourly data one time per day Doc Merkin New Users to Excel 2 September 12th 06 02:21 AM
How to post sample data to this NG M.Siler Excel Discussion (Misc queries) 12 June 27th 05 11:37 PM


All times are GMT +1. The time now is 02:58 PM.

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"