Removing in column B when listed in Column A

I

IainG

Hi

I have a list of text in column A

aaaa
bbbb
ccccc
dddd
eeee
ffff etc....

I also have a list in column B

zzzz
ccccc
xxxx
aaaa
ffff
gggg etc

What I need to do is remove all the entries in colum a from column B

In the example above I would have in column B left

zzzz
xxxx
gggg


Hope this makes sence and someone can help.

Thanks
Iai
 
A

A.W.J. Ales

Iain,
I assume your colums A en B are filled with values A1:A10 and B1:B10

Put in C1 the formula : If(ISNA(VLOOKUP(B1,$A$1:$A$10,1,0)),0,1) and copy
down to C10.
Copy and paste special / values column C.
Finally sort column B and C (in the order of C).

After that the values in column B (where in column C the value = 0) are the
values you want to have ( i.e. values not also mentioned in column A).

--
Regards,
Auk Ales

* Please reply to this newsgroup only *
* I will not react on unsolicited e-mails *
 
D

Don Guillett

try this macro
Sub culllist()
x = Cells(Rows.Count, "b").End(xlUp).Row
On Error Resume Next
For Each c In Range("b1:b" & x)
If Not Columns(1).Find(c) Is Nothing _
Then c.Clear
Next
Range("B1:B" & x).Sort Key1:=Range("B1"), Order1:=xlAscending
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top