Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Compare identifier columns from 2 sheets - remove rows that are dups
I have two sheets with thousands of rows. I need to remove rows from the 2nd
sheet that have the same identifier as rows in the first sheet... so there are no duplicates. Example... 'Sheet1' ddd1234 <several data columns ddd1234 <several data columns abc1234 <several data columns wrd1234 <several data columns wrd1234 <several data columns 'Sheet2' ddd1234 <several data columns abc1234 <several data columns wrd1234 <several data columns www1234 <several data columns ggg1234 <several data columns .... yes, Sheet1 may have multiple rows with the same identifier but that does not matter... I just want to remove rows from Sheet2 anything that matches IDs from Sheet1 - I don't care about consolidating or removing dups from Sheet1. thx for the help! |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Compare identifier columns from 2 sheets - remove rows that are dups
I need this to be a Macro (VBA)... thx!
|
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Compare identifier columns from 2 sheets - remove rows that aredups
hi Livin,
Sub test() With Sheets("Sheet2") For i = .Range("A65536").End(xlUp).Row To 1 Step -1 If Not IsError(Application.Match(.Range("A" & i), Sheets("Sheet1").Range("A:A"), 0)) Then .Rows(i).Delete Shift:=xlUp End If Next End With End Sub -- isabelle Le 2012-05-04 19:35, Livin a écrit : I have two sheets with thousands of rows. I need to remove rows from the 2nd sheet that have the same identifier as rows in the first sheet... so there are no duplicates. Example... 'Sheet1' ddd1234<several data columns ddd1234<several data columns abc1234<several data columns wrd1234<several data columns wrd1234<several data columns 'Sheet2' ddd1234<several data columns abc1234<several data columns wrd1234<several data columns www1234<several data columns ggg1234<several data columns ... yes, Sheet1 may have multiple rows with the same identifier but that does not matter... I just want to remove rows from Sheet2 anything that matches IDs from Sheet1 - I don't care about consolidating or removing dups from Sheet1. thx for the help! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to append and remove dups | Excel Programming | |||
Compare dates and unique identifier | Excel Discussion (Misc queries) | |||
"Add/Remove Rows Code" adds rows on grouped sheets, but won't remove rows. | Excel Programming | |||
Compare columns remove duplicates | Excel Discussion (Misc queries) | |||
Macro that will hidden columns, rows and worksheets based on an identifier | Excel Discussion (Misc queries) |