Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excell Question

Status
Not open for further replies.

djbeenie

Technical User
Jun 20, 2002
134
US
On excel - tools - data analysis ... I have a worksheet that I want to select a 10% sample from. So I go under the aforementioned steps and select sampling. Then I will select the number equaling ten percent and the information is put onto another worksheet. The problem is that it only carries over the information in column A and does not transfer the data associated with the selected row (even though the whole worksheet is highlighted?). Any ideas...


dj beenie
 
Use the sample add-in function to retrieve only keys (or row numbers - see below) from one column. Then...

Arrange the data such that column A contains unique keys, then use VLOOKUP or MATCH functions to retrieve data from any additional columns you need.

Alternatively, arrange the data such that column A contains row numbers, then use the INDEX function to retrieve data from any additional columns you need.

If you don't or can't put row numbers in column A, you can combine the techniques by using MATCH to put the source row number next to the sample key and then use that with the INDEX function to retrieve the extra column data.
 
Another possibility is to add a column to the main database and use MATCH or VLOOKUP to see whether the key is in the sample and then use an auto data filter to select those rows which have a match.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top