How to find values ​​that are in one column but not in another

I have two columns A and B in google spreadsheet.

I want to find all the numbers that are in column A, but not in B. How to do this?

B may have the same numbers from column A.

So, if column A has numbers: 1, 2, 3 and B has numbers 3, 4,5

I want to get all the numbers that are in A, but not in B: 1, 2

How can I do this using the Google distribution sheet?

+9
source share
3 answers

MATCH , A B, A , MATCH #N/A (.. A B):

=FILTER(A:A, ISNA(MATCH(A:A, B:B, 0)))

A , UNIQUE:

=UNIQUE(FILTER(A:A, ISNA(MATCH(A:A, B:B, 0))))
+12

C vlookup A B.

C1 = vlookup(A1,B:B,1)
C2 = vlookup(A2,B:B,1)
...

B A, #N/A

+1

, , .

:

= (A: A, ISNA ( (A: A, B: B, 0)))

"B: B" , A: A B: B.

But if you want to return A: A, excess B: B, less C: C, less D: D, etc.? Just insert B: B, C: C and D: D inside {}, then:

=FILTER(A:A; ISNA(MATCH(A:A; {B:B;C:C;D:D}; 0)))

I hope this can help others like me. I was looking for a solution that would not bring what is present in some set of columns.

Thank!

0
source

Source: https://habr.com/ru/post/1546220/


All Articles