Partial cell(or string) match in excel macro
问题 I am new to VBA and I would like to do a partial string (or cell) match between two sheets. An example of Name1 would be "IT executive Sally Lim" An example of Name2 would be "Sally Lim" Name1 = Sheets("Work").Cells(RowName1, ColName1) Name2 = Sheets("Roster").Cells(RowName2, ColName2) 'This condition doesn't work If Name1 = "*" & Name2 & "*" Then 'The "Name2" comes out with a compile error: Invalid Qualifier Name2.Font.Strikethrough Exit Do Else End If However, it is not working. When I run