search - Excel - See if cells in one column contain text from another -


currently using below see if cells in column b exist in column a...

=if(iserror(match(b1,a:a,0)),"false","true") 

... i've realised need not check exact match, rather if cells in column b contain text appear in of cells in column a.

for example, if cell in column b contains "tic081_cl1" return "true" if column contains cell "tic081"...

can me please, current working works eact matches. many assistance!!!

since guaranteed there underscore "_" separating values searching need check 2 distinct conditions:

  1. if entire value b1 found within a:a
  2. if value before _ found within a:a

we can accomplish using additional match derived original formula:

=if(iserror(match(mid(b1,1,find("_",b1)-1),a:a,0)),if(iserror(match(b1,a:a,0)),"false","true"),"true") 

you can alternatively using 2 countif formulas:

=if(countif(a:a,b1)+countif(a:a,mid(b1,1,find("_",b1)-1))>0,"true","false") 

Comments

Popular posts from this blog

IF statement in MySQL trigger -

c++ - What does MSC in "// appease MSC" comments mean? -

javascript - Blogger related post gadget image Resize s72-c [ Need Expert Help ] -