On Feb 21, 2:04*am, Len wrote:
Hi,
I need excel vba codes to remove duplicates based on example below : -
Duplicates * * *Tran Date * * * Doc Ref No.Tran Amt. Tran Type
8920331 9/12/2010 * * * 892033 * * *60.00 * * * * 1
8920331 14/12/2010 892033 * * * * *60.00 * * * * *1
8923992 1/12/2010 * * * 892399 * (19,970.00) 2
8920332 10/12/2010 892033 * * * *(60.00) * * * * *2
8923991 212/2010 * * * *892399 * 19,970.00 * 1
8923992 3/12/2010 * * * 892399 * (19,970.00) *2
1st case = Say duplicate is 892033 in column C
If 8920331 & 8920332 ( ie helper column where Duplicate & Tran Type)
are found in column "A " then
Remove that rows
2nd case = Say duplicate is 892399 in column C
If 8923391 & 8923392 are found in column "A " then
Remove that rows
May be they are more cases of duplicates in column A and will be
remove that rows accordingly until there are no duplicates
The final result will be : -
Duplicates * * *Tran Date * * * Doc Ref No.Tran Amt. Tran Type
8920331 9/12/2010 * * * 892033 * 60.00 * * * 1
8923992 3/12/2010 * * * 892399 * (19,970.00) * *2
Any helps will be appreciated and thanks in advance
Regards
Len
You might want to check out Chip Pearsons 'Unique Finder' code:
http://www.cpearson.com/excel/GetDistinct.aspx