PDA

View Full Version : check if in wkbk1 then delete in wkbk2 if 5 fields match



ckelley1020
06-14-2011, 09:14 AM
I have two workbooks with 1 worksheet each. workbook 1 has 20 columns.
Workbook 2 has 20 columns as well. I want to see if the first 5 columns in wkbk1 match any of the first 5 columns in wkbk2. If they do delete that row from wkbk2.

WKBK1

01/01/2009 01/01/2010 ABC Company 1234 Main Street Washington DC
01/01/2009 01/01/2010 BAC Company 12 Brown Street Washington DC
10/03/2009 10/03/2010 B&A INC 470 Black Street Washington DC

WKBK2

01/01/2009 01/01/2010 ABC Company 1234 Main Street Washington DC
01/01/2009 01/01/2010 ARMS LLC 372 White Street Washington DC
10/03/2009 10/03/2010 B&A INC 470 Black Street Washington DC

In this data set, item 1 and 3 are the same in both WKBK1 and WKBK2 and should be deleted from WKBK2.

Thanks for your help.