vba公式求助

问题描述:

vba公式求助
用vba公式,a列中有几组数字如:123456,456789,741852,963852,452783.如果a列同时含有2、5、6时,则b列等于0,否则b列加1,

如果用VBA的话,假如数据在a1:a100中,请在VBA编辑器中输入:
Sub Lookup256()
For i = 1 To 100
If (Cells(i, 1) Like "*2*" And Cells(i, 1) Like "*5*" And Cells(i, 1) Like "*6*") Then
Cells(i, 2) = 0
Else
Cells(i, 2) = 1
End If
Next i
End Sub