试试这个简单的vba代码,
Sub findMatch()
Dim i As Long, j As Long
For i = 2 To Cells(Rows.Count, 1).End(xlUp).Row
For j = 2 To Cells(Rows.Count, 2).End(xlUp).Row
If InStr(Cells(i, 1), Cells(j, 2)) Then
Cells(i, 1) = Cells(j, 2)
End If
Next j
Next i
End Sub
<强>之前强>
<强>后强>
A列是您必须搜索的数据,B列是字符串列表。