Wednesday, August 7, 2013

Google Spreadsheet Match Values of Two Columns

Question:

( by Mehdi Bamou )


Hi,

Thank you for reading this topic :)

Well, i do have this :

Col1    |    Col2
----------------------------------
3               5
5               9
7               7
9               1
2               0
12             3
4
5

and i wount to get a colum Col3 with the element that exist in col1 but not in col2, then a Col4 that have element existing in Col2 but not in Col1

i did try to use Query, but not a chance to make it work ...
 = query("A3:B";"Select A where A is in array(B3:B)") // please tell me if this one exist !

Thank you

Solution:


Have a look at the following screenshot of my Spreadsheet:


I have the following formula in Cell C1:
=query(arrayformula(iferror(if(match(A3:A;B3:B;0);"");A3:A));"select Col1 where Col1 is not null";0)

And I have the following formula in Cell D1:
=query(arrayformula(iferror(if(match(B3:B;A3:A;0);"");B3:B));"select Col1 where Col1 is not null";0)


I hope the above solution will help you, and if you need more help then please do comment below on this blog itself, I will try to help you out.


I also take up private and confidential projects:
If this blog post was helpful to you, and if you think you want to help me too and make my this blog survive then please donate here: http://igoogledrive.blogspot.com/2012/09/donate.html 

Thanks,

No comments:

Post a Comment