Hello Christophe,
Rather than set the entire Module to ignore case when comparing text, you can choose how InStr will compare the data by setting the fourth argument Compare. This argument is optional. The default setting is Binary.
The InStr function will return either a 0 (zero) or a positive integer. Error handling is not needed because InStr will never throw an error if the string being searched is empty.
If the button is on the worksheet "Working Data", you can use this macro.
Private Sub GoButton_Click()
Dim Row As Long
With GoButton.Parent
For Row = 2 To .Cells(Rows.Count, "A").End(xlUp).Row
If InStr(1, .Cells(Row, "K"), "Top", vbTextCompare) Then
.Cells(Row, "M").Resize(1, 2) = Array("Nice", "Cool")
End If
Next Row
End With
End Sub
If the button is not on the worksheet "Working Data" then you should this macro.
Private Sub GoButton_Click()
Dim Row As Long
With Worksheets("Working Data")
For Row = 2 To .Cells(Rows.Count, "A").End(xlUp).Row
If InStr(1, .Cells(Row, "K"), "Top", vbTextCompare) Then
.Cells(Row, "M").Resize(1, 2) = Array("Nice", "Cool")
End If
Next Row
End With
End Sub