Quick bit of excel help!

Soldato
Joined
1 Jul 2007
Posts
21,912
Location
Various
Hi!

I could do with a quick bit of help in Excel, with something that I hope will be pretty simple.

I have two lists (lets call them A and B) of contacts. List A is a full list of contacts, while List B is a list of certain contacts which have been copied across from List A. All contacts on List B are on List A.

What I need to do is to delete all the contacts which are on List B from List A. Ideally I don't want to manually go through them all, as there are a good few hundred of them! Can anyone help? Thanks in advance :D
 
You could probably do a V Lookup to find them all, and then be able to delete them... google V Lookup, I'm terrible at it :)
 
Not sure VLOOKUP would work for what you want as it will just select Row B where Row A = your criteria.

Seems like you could do with some VB code to say if A1 Exists Within BX:BX then delete, then move to the next cell and repeat... unfortunately my VB abilities do not exist... lol

www.mrexcel.com is awesome for support though mate.
 
That wouldn't actualy do a delete though would it? Just count/sum the number that exist in both?

Yeah you're right I should have mentioned that :p, but then again I don't think there's a way excel can delete data short of a VBA macro?

I would just put the formula in Column C, and filter it afterwards to delete the data.
 
Try this in a macro:

Code:
    On Error Resume Next
    For i = 9 To 13
    cell = "G" + CStr(i)
    Name = Range(cell).Text
    Range("F9:F13").Find(Name).Delete
    Next

I'm removing all items in G9:G13 from the range F9:F13, so modify to suit your needs.

btw, this is a 2 minute hack, please no grief about what I've done wrong/what can be done better!

:)
 
Back
Top Bottom