求助,第一列判断是否含有第二列的1个字符,判断结果自动录入到第十列
With Tables("表A")
For i As Integer = 0 To .Rows.Count -1
Dim Q As String =
CurrentTable.Rows(i)("第一列")
Dim Str1 As String =
CurrentTable.Rows(i)("第二列").SubString(0,1)
Dim Str2 As String =
CurrentTable.Rows(i)("第二列").SubString(1,1)
Dim Str3 As String =
CurrentTable.Rows(i)("第二列").SubString(2,1)
If Str1 > "" AndAlso Str1.Contains(Q)
= False And Str2 > ""
AndAlso Str2.Contains(Q) = False And Str3 > "" AndAlso
Str3.Contains(Q) = False Then
.Rows(i)("第十列") = "含有字符"
Else
.Rows(i)("第十列") = "没含"
End If
Next
End With
上面代码 没含的代码无效,求助修复
项目高版本打不开,辛苦版主代码贴出来
[此贴子已经被作者于2022/12/6 21:44:30编辑过]