I'm trying to create a formula to look in cell F2 as master cell and then look in cell G2 and find the same words and if it doesn't find the same words then "Check". F2 has probably 50 words in it and G2 a little less. Is this possible?
Book1 | |||||
---|---|---|---|---|---|
F | G | H | |||
1 | Master | Second | |||
2 | banana cherry orange apple pineapple kiwi lemon lime tangerine pomelo | horse zebra dog goat pig chicken lion gnu puma | Check | ||
3 | banana cherry orange apple pineapple kiwi lemon lime tangerine pomelo | horse zebra dog goat pig kiwi chicken lion gnu puma | |||
4 | banana cherry orange pineapple kiwi lemon lime tangerine pomelo | horse zebra dog goat pig apple chicken lion gnu puma | Check | ||
Sheet3 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
H2:H4 | H2 | =IF(AND(ISERROR(SEARCH(" "&TEXTSPLIT(F2," ")&" "," "&G2&" "))),"Check","") |
Is there a way for the formula to call out what doesn't match or it cannot find?
=IF(AND(ISERROR(SEARCH(" "&TEXTSPLIT(F2," ")&" "," "&G2&" "))),"Check","")
Book1 | |||||||
---|---|---|---|---|---|---|---|
F | G | H | I | J | |||
1 | Master | Second | Words in F, Not in G | Words in G, Not in F | Words in both | ||
2 | banana cherry orange apple pineapple kiwi lemon lime tangerine pomelo | horse zebra dog goat pig chicken lion gnu puma | banana, cherry, orange, apple, pineapple, kiwi, lemon, lime, tangerine, pomelo | horse, zebra, dog, goat, pig, chicken, lion, gnu, puma | N/A | ||
3 | banana cherry orange apple pineapple kiwi lemon lime tangerine pomelo | horse zebra dog goat pig kiwi chicken lion gnu puma | banana, cherry, orange, apple, pineapple, lemon, lime, tangerine, pomelo | horse, zebra, dog, goat, pig, chicken, lion, gnu, puma | kiwi | ||
4 | Honda Hyundai Acura Ford GM Toyota | Ford GM Ferrari Acura Honda Fiat | Hyundai, Toyota | Ferrari, Fiat | Ford, GM, Acura, Honda | ||
Sheet3 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
H2:H4 | H2 | =TEXTJOIN(", ",1,LET(words,textsplit(F2," "),FILTER(words,ISERROR(SEARCH(" "&words&" "," "&G2&" ")),"N/A"))) |
I2:I4 | I2 | =TEXTJOIN(", ",1,LET(words,textsplit(G2," "),FILTER(words,ISERROR(SEARCH(" "&words&" "," "&F2&" ")),"N/A"))) |
J2:J4 | J2 | =TEXTJOIN(", ",1,LET(words,textsplit(G2," "),FILTER(words,ISNUMBER(SEARCH(" "&words&" "," "&F2&" ")),"N/A"))) |