Hello -

Below is code I'm getting type mismatch error on. The cell starts with = and iss not part of a formula.
Can you tell me how to get around this?

or Each cel In rng

    If InStr(cel.Value, ".abap") > 0 Then
    
          x = InStr(cel.Value, "Z")
          y = InStr(1, cel.Value, ".", vbTextCompare)
          
              If x > 0 Then
                str1 = Mid(cel.Value, x, y - x)
                Cells(s, 12) = str1
                s = s + 1
              End If
    End If
    
Next cel
Thanks