Subtracting one column from another

  • Thread starter Thread starter Brian Bagnall
  • Start date Start date
B

Brian Bagnall

Hi,

I have two columns of data and I want to remove any names that appear
in another column. For example:

Column 1:

Bill
Henry
Ruby

Column 2:
Frank
Bill
Joe

I want the calculation to subtract any names that appear in Column 2
to produce the following:

Henry
Ruby

Please let me know what I have to do, possibly with an SQL statement,
to produce this including naming worksheets if thats necessary.

- Brian
 
Another play to try, using non-array formulas ..

Assume data is in cols A and B, from row1 down

Bill Frank
Henry Bill
Ruby Joe

Put in D1:
=IF(ISNUMBER(MATCH(A1,B:B,0)),"",ROW())

Put in C1:
=IF(ISERROR(SMALL(D:D,ROW(A1))),"",
INDEX(A:A,MATCH(SMALL(D:D,ROW(A1)),D:D,0)))

Select C1:D1, copy down until the last row of data in col A

Col D will return the desired results, neatly bunched at the top, viz.:
Henry
Ruby

Freeze the results with an in-place:
Copy > Paste special > Values > OK

--
 

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

Back
Top