Formula to find same words in one cell that is in another cell

squeakums

Well-known Member
Joined
May 15, 2007
Messages
851
Office Version
  1. 365
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?
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Try:

Book1
FGH
1MasterSecond
2banana cherry orange apple pineapple kiwi lemon lime tangerine pomelohorse zebra dog goat pig chicken lion gnu pumaCheck
3banana cherry orange apple pineapple kiwi lemon lime tangerine pomelohorse zebra dog goat pig kiwi chicken lion gnu puma 
4banana cherry orange pineapple kiwi lemon lime tangerine pomelohorse zebra dog goat pig apple chicken lion gnu pumaCheck
Sheet3
Cell Formulas
RangeFormula
H2:H4H2=IF(AND(ISERROR(SEARCH(" "&TEXTSPLIT(F2," ")&" "," "&G2&" "))),"Check","")
 
Upvote 0
How about:

Book1
FGHIJ
1MasterSecondWords in F, Not in GWords in G, Not in FWords in both
2banana cherry orange apple pineapple kiwi lemon lime tangerine pomelohorse zebra dog goat pig chicken lion gnu pumabanana, cherry, orange, apple, pineapple, kiwi, lemon, lime, tangerine, pomelohorse, zebra, dog, goat, pig, chicken, lion, gnu, pumaN/A
3banana cherry orange apple pineapple kiwi lemon lime tangerine pomelohorse zebra dog goat pig kiwi chicken lion gnu pumabanana, cherry, orange, apple, pineapple, lemon, lime, tangerine, pomelohorse, zebra, dog, goat, pig, chicken, lion, gnu, pumakiwi
4Honda Hyundai Acura Ford GM ToyotaFord GM Ferrari Acura Honda FiatHyundai, ToyotaFerrari, FiatFord, GM, Acura, Honda
Sheet3
Cell Formulas
RangeFormula
H2:H4H2=TEXTJOIN(", ",1,LET(words,textsplit(F2," "),FILTER(words,ISERROR(SEARCH(" "&words&" "," "&G2&" ")),"N/A")))
I2:I4I2=TEXTJOIN(", ",1,LET(words,textsplit(G2," "),FILTER(words,ISERROR(SEARCH(" "&words&" "," "&F2&" ")),"N/A")))
J2:J4J2=TEXTJOIN(", ",1,LET(words,textsplit(G2," "),FILTER(words,ISNUMBER(SEARCH(" "&words&" "," "&F2&" ")),"N/A")))
 
Upvote 0

Forum statistics

Threads
1,225,156
Messages
6,183,229
Members
453,152
Latest member
ChrisMd

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top