I would like create a macro (VBA) that find a word and in another cell give a word. Example:
|A | B| macro result|
|- |- | -|
|1 |my cat is on the table | ok|
|2 | Hi| |
|3| this is my house| ok|
I have try this but it doesn't work. Can you help me?
Sub Macro1()
riga = 1
While (Sheets("Foglio2").Cells(riga, 1) <> "")
If (Sheets("Foglio2").Cells(riga, 2) Like "my") Then
Sheets("Foglio2").Cells(riga, 3) = "ok"
End If
riga = riga + 1
Wend
End Sub
If (Sheets("Foglio2").Cells(riga, 2) Like "my") Then
withIf Instr(Sheets("Foglio2").Cells(riga, 2), "my") > 0 Then
- FaneDuru