The code below goes through the column C of plan2 looking for the words in column A of plan1, writing in column D of plan2 "found", if you have found any of the words or "hidden", if you have not found any.
Include the code below in a macro in your spreadsheet.
Sub Macro1()
Dim linhas1 As Long
Dim linhas2 As Long
Dim i As Long
Dim j As Long
linhas1 = Worksheets("plan1").Cells(Rows.Count, 1).End(xlUp).Row
linhas2 = Worksheets("plan2").Cells(Rows.Count, 3).End(xlUp).Row
For i = 1 To linhas1
For j = 1 To linhas2
If (Worksheets("plan2").Cells(j, 4) <> "encontrado") Then
a = InStr(1, Worksheets("plan2").Cells(j, 3), Worksheets("plan1").Cells(i, 1), 1)
If (a = 0) Then
Worksheets("plan2").Cells(j, 4) = "oculto"
Else: Worksheets("plan2").Cells(j, 4) = "encontrado"
End If
End If
Next j
Next i
End Sub
Mike, I don’t quite understand your problem. Post your code, an image of the spreadsheet, which you draw more clearly, because that way it gets complicated.
– rbz
Welcome(a). Please do the [tour], then read How we should format questions and answers? and create a [mcve] for the question. Because the question is too wide and when you are more specific, there are more chances of your question being answered correctly. With an example table
– danieltakeshi