View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Matching Two Columns with Many rows

I'd insert a new column B and a new column D.

So the original data is in column A and column C.

Then in B1, put this formula:
=if(isnumber(match(a1,c:c,0)),"In column C","Not in column C")
then drag down.

And a similar formula in column D:
=if(isnumber(match(c1,a:a,0)),"In column A","Not in column A")

========

In fact, you may want to try this.

Start a new worksheet
copy your data in column A to column A of that new worksheet
copy your data in column B to the bottom of column A of that new worksheet
(include a single header row in row 1)

Now you have a giant list in column A--but it may have duplicates.

Select column A of that new worksheet.
Data|Filter|advanced filter
copy to another location (Use B1 of that new sheet)
Check unique records only

Delete column A (we're done with it)

Add headers in B1 and C1:
B1: It's in column A
C1: It's in column B

Now put this in B2.
=isnumber(match(a2,sheet1!a:a,0))
put this in C2:
=isnumber(match(a2,sheet1!b:b,0))

Select B2:C2
and drag down.

You can filter on each of those columns to see what you want.
You'l


srbanksphd wrote:

Hello all,

I have never used this posting system before and I considered myself an
advanced Excel user before reading some of the posts and their answers on
this site. I have never used VBA before or any Macros, so please keep that
in mind if answering.

Question:

I have two columns of data (A and B). Each has close to 1000 rows. I need
to know which values appear in both columns. That's most important. I would
also like to know which values are exclusively in Column A or B, but that
would be secondary.

Thank you in advance.


--

Dave Peterson