View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bernard Liengme Bernard Liengme is offline
external usenet poster
 
Posts: 4,393
Default Check for duplicates and move to another worksheet

Not very automated but here's a suggestion
Assume your data is in A1:F100
In G1 enter =C1&"*"&D1 and copy down the column by double clicking the fill
handle
In H1 enter =MIN(COUNTIF($G$1:$G$100,G1)-1,1) and copy down
If both C and D occur with same values in more than 1 row you get a value of
1
Now temporarily sort (you have the sequence number to 'unsort') by H or use
Data|Filter to let you get all rows with H value of 1
Copy and paste to new worksheet
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Reggie" wrote in message
...
Hi I have a worksheet that has 6 columns and variable rows. Each column
has
numbers for the values. what i need is excel to check column 3 and 4 and
compare it with the rest of the rows if duplicates are found move the all
duplicates including the original to another worksheet. Start with row 1
then
continue the whole process

example:
Worksheet 1
sequence trace amount check trancode pck trace
1 4444 .10 1111 45 85
<----- Original
2 4521 1.15 859 54 75
3 8631 .10 1111 45 56
<----- Duplicate


Worksheet 2
1 4444 .10 1111 45 85
<----- moved to worksheet 2 for worksheet 1

3 8631 .10 1111 45 56
<----- moved to worksheet 2 for worksheet 1

thanks in advance!