Link to home
Start Free TrialLog in
Avatar of Iretioluwa Olawuyi
Iretioluwa OlawuyiFlag for Nigeria

asked on

Extracting multiple records from a Data set

I have a data I want to analyze by extracting at random, 4% of the unique record in column 1 and is either Gold or Silver as indicated in the second column.

I will be glad to have your assistance.

Data Source
Avatar of Saqib Husain
Saqib Husain
Flag of Pakistan image

Can you explain/specify in what form is the output desired?
Avatar of Iretioluwa Olawuyi

ASKER

Thank you for your response sir,

The table below is a summary of the other file I shared, I wanted to extract a list from the record such that for each item on the first column as shown below, I have an extraction equal to the no of rows as indicated in the column with the 4% header. I could use a filter and go through one by one, but I believe there's a better way to go about it.

PS Territory      No       4%
94C5A1AA      281      12
94C5A1AB      344      14
94C5A1AC      224      9
94C5A1AD      211      9
94C5A1AE      315      13
94C5B2AA      281      12
94C5B2AB      411      17
94C5B2AC      341      14
.
.
.
Grand Total      79904
Take a look at this file
Data-Extract.xlsx
Many thanks for the attempt sir, I appreciate it.
However, what you did is the summary and what I really need is the data just like this extract I did manually...

94C5A1AA      Silver
94C5A1AA      Gold
94C5A1AA      Silver
94C5A1AA      Gold
94C5A1AA      Silver
94C5A1AA      Gold
94C5A1AA      Silver
94C5A1AA      Gold
94C5A1AA      Silver
94C5A1AA      Silver
94C5A1AA      Silver
94C5A1AA      Gold
94C5A1AB      Gold
94C5A1AB      Silver
94C5A1AB      Silver
94C5A1AB      Gold
94C5A1AB      Silver
94C5A1AB      Gold
94C5A1AB      Gold
94C5A1AB      Silver
94C5A1AB      Silver
94C5A1AB      Gold
94C5A1AB      Silver
94C5A1AB      Silver
94C5A1AB      Gold
94C5A1AB      Silver

This is what you did sir

94C5A1AA      281      12
94C5A1AB      344      14

I can't seem to continue manually, else I'll spend the whole day on it.
If you've worked with queries on MS Access, I can exploit that as well, but I haven't gotten a query that gives me what I wanted.
ASKER CERTIFIED SOLUTION
Avatar of Saqib Husain
Saqib Husain
Flag of Pakistan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I will like to thank you very much for your support on this challenge Sir,
I know I can't thank you enough but I pray that God will bless you. Amen.
I was able to read through the vba code and will go ahead to use it and append the remaining variables to column G.
Many Thanks!!!