Private Sub CommandButton1_Click()
Dim Arr1, Arr2, i, z
Arr1 = Array("ABC", "FRG", "TST", "WOS", "WAS", "WER")
Arr2 = Array("ABC Text", "FRG Text", "TST Text", "WOS Text", "WAS Text", "WER Text")
For z = 1 To 1000
If Cells(z, 1) <> "" Then
For i = 0 To UBound(Arr1)
If InStr(Cells(z, 1), Arr1(i)) > 0 Then
Cells(z, 2) = Arr2(i)
End If
Next i
End If
Next z
End Sub
|