用 Like 统计表达式总是出错,不知道错在哪里?谢谢!
Dim dt1 As Table = Tables("谜语竞猜数据库")
For Each dr1 As Row In dt1.Rows
If Not dr1.IsNull("答案") AndAlso Not dr1.IsNull("谜底") Then
If (dr1("答案") = dr1("谜底") Or dr1("附加谜底") Like "%" & dr1("答案") & "%") AndAlso dr1("统计对象") = "1" Then
dr1("得分") = 1
Else
dr1("得分") = 0
End If
End If
Next
表达式里使用like:http://www.foxtable.com/webhelp/topics/0102.htm
这时2种完全不同的东西,注意不要混淆了
If (dr1("答案") = dr1("谜底") Orelse dr1("附加谜底") Like "*" & dr1("答案") & "*") AndAlso dr1("统计对象") = "1" Then
谢谢!
如果"附加谜底"是用“,”隔开的多值单元格,如“2007开始,2010启用,九一八事变,2099”;用了“*”后,“207”、“099”或“事变”都被判定为正确,怎么改呢?谢谢!
[此贴子已经被作者于2024/8/10 15:22:39编辑过]