|
If Cells(i, "G").Value Like "*" + Sheet2.Cells(j, k).Value + "*" Then
Cells(i, "E").Value = Sheet2.Cells(j, 2).Value
求大神指教,上面的第一句是啥意思??? 感谢!
If Cells(i, "G").Value Like "*" + Sheet2.Cells(j, k).Value + "*" Then
这句是判断
比较两个字符串
“*”代表多个字符
+相当于&,就是连接
"*" + Sheet2.Cells(j, k).Value + "*" 这个就是Sheet2.Cells(j, k).Value 这个值的左右添加任意字符
然后比较 Cells(i, "G").Value 和"*" + Sheet2.Cells(j, k).Value + "*" 是否匹配
是,就运行下面语句,否则退出
|
|