ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How do I get unique values from 2 columns? (https://www.excelbanter.com/excel-discussion-misc-queries/1810-how-do-i-get-unique-values-2-columns.html)

akmccarthy

How do I get unique values from 2 columns?
 
I need to get the unique values between 2 columns. For example, if A has
2,3,4,5 & 7 and B has 1,2,3,4,and 5, I need something to tell me that B
doesn't have 7. I expect to run through it again so that I see that A doesn't
have 1. I do not wish to enter in the data to search for, but rather have a
column comparison and kickout the differences (similar to a diff command on
Unix for those that know it).

Any help would be appreciated. The advanced filter doesn't do what I need
as it would give me all values.
Thanks,
Kelly

Jason Mori

How about coloring the cells in col. A where the number
is not found in col. B and vice-versa?

1. Select col. A.
2. Go to Format Conditional Formatting
3. Select "Formula Is" on the drop-down arrow.
4. Insert:
=ISNA(MATCH($A1,$B:$B,0))
5. Click on the "Format" button and format as desired.
6. OK out and select col. B.
7. Follow the same steps above except use:
=ISNA(MATCH($B1,$A:$A,0))

HTH
Jason
Atlanta, GA

-----Original Message-----
I need to get the unique values between 2 columns. For

example, if A has
2,3,4,5 & 7 and B has 1,2,3,4,and 5, I need something to

tell me that B
doesn't have 7. I expect to run through it again so that

I see that A doesn't
have 1. I do not wish to enter in the data to search

for, but rather have a
column comparison and kickout the differences (similar

to a diff command on
Unix for those that know it).

Any help would be appreciated. The advanced filter

doesn't do what I need
as it would give me all values.
Thanks,
Kelly
.


Peo Sjoblom

You would need 2 help columns, in one use

=IF(ISERROR(MATCH(A2,B:B,0)),A2,"")

copy down

in the other use

=IF(ISERROR(MATCH(B2,A:A)),B2,"")

will return 7 in the first and 1 in the second

Regards,

Peo Sjoblom



"akmccarthy" wrote:

I need to get the unique values between 2 columns. For example, if A has
2,3,4,5 & 7 and B has 1,2,3,4,and 5, I need something to tell me that B
doesn't have 7. I expect to run through it again so that I see that A doesn't
have 1. I do not wish to enter in the data to search for, but rather have a
column comparison and kickout the differences (similar to a diff command on
Unix for those that know it).

Any help would be appreciated. The advanced filter doesn't do what I need
as it would give me all values.
Thanks,
Kelly



All times are GMT +1. The time now is 06:19 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com