Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I have an excel sheet of 85,038 rows, how do I randomly select 10% of these?

There are 5 columns (first name, email, userid, app name) and I want to randomly select 10% of these rows and export it eventually to a CSV while maintaining the column headers i listed above. thanks a million

like image 716
Navid Behroozi Avatar asked Aug 06 '14 21:08

Navid Behroozi


People also ask

How do I randomly fill values from a list of data in Excel?

(1) In a blank cell enter the formula =RANDBETWEEN(1,15), and drag the fill handle to the range you need. (2) In the cell where you will fill name randomly from the given list, enter the formula =VLOOKUP(C2,$A$1:$B$16,2,FALSE), and drag the fill handle to the range you need.

How do you select rows with certain values in Excel?

Use the Go To command to quickly find and select all cells that contain specific types of data, such as formulas. Also, use Go To to find only the cells that meet specific criteria,—such as the last cell on the worksheet that contains data or formatting.


1 Answers

I don't know how random you want this to be but adding a column containing =RANDBETWEEN(1,85038) copied down to suit, then sorting that column and selecting the first 8,504 rows should give quite an 'arbitrary' result.

like image 107
pnuts Avatar answered Oct 26 '22 23:10

pnuts