+ Reply to Thread
Results 1 to 4 of 4

Sampling

  1. #1
    Registered User
    Join Date
    06-24-2008
    Posts
    10

    Sampling

    Hello,

    I have a excel sheet with about 1000 rows and 60 columns. in each row, the first column is a UserID and the rest of the columns have some information for that UserID. I want make a sample of 500 of 1000 records. how can I do it?
    example:
    say this is my dataset before sampling:

    userID spsID Name
    668 41089 Playing
    2329 41627 Eating
    681 38411 Driving
    674 38481 Drinking
    674 38459 Sleeping
    672 41736 Reading
    672 41228 Sitting
    731 38867 Driving
    672 38323 Sitting
    749 39044 Driving

    after sampling I want to have something like this:
    userID spsID Name
    674 38481 Drinking
    749 39044 Driving
    2329 41627 Eating
    668 41089 Playing
    672 38323 Sitting
    Note: I have also downloaded Data analysis for my excel.

    Thanks a lot

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    Pick a blank 1000-row range. In one column, enter =RAND(). In the next, enter sequential numbers 1-1000. Sort the two-column range by the random numbers. The top 500 rows of the (formerly) sequential numbers are 500 random records.

  3. #3
    Registered User
    Join Date
    06-24-2008
    Posts
    10
    didnt quite get it. could you explain more clearly?

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Is that a better title than the one I asked you to change here?:

    http://www.excelforum.com/excel-gene...-sampling.html
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 06-20-2008, 02:47 PM
  2. Replies: 1
    Last Post: 06-16-2008, 05:42 PM
  3. ATS data sampling frequency question
    By vectortrader in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-11-2008, 11:48 AM
  4. Random Sampling
    By orangeIV in forum Excel General
    Replies: 2
    Last Post: 03-26-2007, 11:59 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1