Compare and Remove

Trevasaurus

New Member
Joined
Dec 4, 2012
Messages
13
Hi. I'm having a problem that I need help with. Here it is.

I have two columns of data. Each contains a 1 to 3 digit code. I need to compare column A to column B and if a code in A = a code in B, I need the entire row that intersects the cell in column A to be removed. Let me give the example:

(The information in Column B is in a separate worksheet but in the same work book.)

Worksheet 1 Worksheet 2
A B C D A
1 CL random data numbers 1 DBA
2 BC random data numbers 2 BL
3 DLB random data numbers 3 CL
4 ABA random data numbers 4 ST

Now what I've been trying to do, is have Column A in Sheet1 compare to Column A in sheet 2, and if the cells are equal (CL = CL), then remove the entire 'CL' containing row in worksheet 1.

I've tried in vein to solve this. Can anyone help please?
 

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top