How can I check if a cell contains two separate strings in a cell? I tried:
ElseIf InStr(1, UCase(testVal), UCase("goku"), 1) And InStr(1, UCase(testVal), UCase("vegeta"), 1) Then
Worksheets("Export Worksheet").Cells(i, 18).EntireRow.Interior.ColorIndex = "4"
However, this does not work...
If I use
ElseIf InStr(1, UCase(testVal), UCase("goku"), 1) & InStr(1, UCase(testVal), UCase("vegeta"), 1) Then
Worksheets("Export Worksheet").Cells(i, 18).EntireRow.Interior.ColorIndex = "4"
It will highlight the row if "goku" OR "vegeta" are in the cell. However, I need BOTH values to be in the cell.
Please help!