Reputation: 37
I am trying to find a custom formula to highlight a cell from one column (A) if it contains a partial text from another column (C)
I created a sample spreadsheet: https://docs.google.com/spreadsheets/d/10m3lHi45BFtKuvDKUbOFAkxjAOhr0VtAnWASwgFIVGY/edit?usp=sharing
What I tried so far is this =IFERROR(IF(MATCH(""&INDIRECT("$A1")&"",$C1,0)>0,true,),false)
but that only works with the first cell also tried REGEXMATCH and search but couldn't come up with the right formula
Upvotes: 0
Views: 902
Reputation: 10084
You can also try with this, it joins the whole C column and matches with REGEXMATCH. The second parenthesis excludes when the cell is empty:
=REGEXMATCH(JOIN(",",C:C),A1)*(A1<>"")
Upvotes: 3
Reputation: 29886
use:
=ARRAYFORMULA(MAX(IFERROR(SEARCH(A1,TEXTJOIN(" ",TRUE,$C:$C),1)),)*(A1<>""))
Upvotes: 2