compare 2 columns and remove rows that match

ibf

New Member
Joined
Sep 29, 2006
Messages
18
I'm not sure how to do this or if it can be done. I have 2 columns of of numbers. I want to remove numbers in column A if the number is in column B. I've tried to look it up on how to do but can't find anything.
Can some one help??

Column A Column B
3551001 3551002
3551002 3551004
3551003
3551004
3551005

I would like result to look like this:

Column A Column B
3551001 3551002
3551003 3551004
3551005
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying

smiths87

Board Regular
Joined
Aug 7, 2006
Messages
106
You could put the following formula in Column C (or wherever). Select cells C1 through the lenth of your data in Column A, hit F2, enter this =if(iserror(match($A$1:$A$5, $B1:$B2, 0)), $A$1:$A5, ""), and confirm it with Shift+Control+Enter. That will give you everything in Column A that isn't in Column B.
 
Upvote 0

Forum statistics

Threads
1,191,579
Messages
5,987,428
Members
440,096
Latest member
yanaungmyint

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
Top