PDA

View Full Version : duplicate records extraction with percentage requirement



punna111
11-21-2012, 02:20 PM
Hi all,

I have following data on my excel sheet.

man
man
man
man
man
man
man
man
man
man
john
john
john
john
john
john
john
john
john
john
john
john
john
john
john
john
john
john
john
john

10 man cells are there, and 20 john cells are there.
i need 10% of this data.
it means 1 man, 2 john.

i need a vb program/macro to do this.

please help me...
Thanks in advance..

PRB :banghead:

patel
11-21-2012, 11:46 PM
attach a sample file with data and desired result

punna111
11-22-2012, 12:04 AM
Thanks for reply..

I have attached a file.

I need a macro to check the duplicates and extracts 10% of data in "C" column.

according to given data 1 man, 2 john should be the answer.

PRB:help

mohanvijay
11-22-2012, 12:35 AM
Why don't you use pivot table?

Teeroy
11-22-2012, 03:00 AM
Hi punna111,

Have a look at the attached spreadsheet. The code looks excessive because I used Functions I already had (both mine and from CPearson's site) to handle the bulk of the work and they are general rather than specific.