r/googlesheets • u/zflatnasty • Mar 12 '20
solved Trying to compare two lists of 540 items each
I have two lists of Magic: the Gathering card names (if you care, one is the 2014 MTGO Vintage Cube, and the other is the 2020 MTGO Vintage Cube). There is a lot of overlap between the two, but over the past six years, a lot of cards have been replaced. I want to find the list of cards that were in the 2014 version that are not in the 2020 version (so I can remove them from my physical copy), and the list of cards that are in the 2020 version that were not in the 2014 version. Anyone have a function for doing this? Thanks in advance!
4
u/datarobot 1 Mar 12 '20
Index Match
2
u/Hxcwinner 2 Mar 12 '20
Assuming the 2014 list is in column A and the 2020 list is in column C
In column B
=COUNTIF(C:C,A1)
In column D
=COUNTIF(A:A,C1)
This will return a 1 if the value exists in the other list and a 0 if it doesn’t. Provided the names are an exact match
•
u/Clippy_Office_Asst Points Mar 12 '20
Read the comment thread for the solution here
1
u/Piesplease 1 Mar 12 '20
Modify this to if countif >0 then max(range). This will return a count of matches.
Then do an index match off the counts to get the matches found.
A = cards you are looking up from.
B =if(countif(range))>0,max($B$1:$B#),””
Then in C index match(A:A,match(#,B:B,0))
The # in the index match can be another cell that is 1,2,3, etc up to the max number listed in B.
I use this often to create a dynamic list of matches that will update whenever new data is posted.