那逻辑是什么?刷两次卡,怎么处理?
Tables("表A").Sort = "第一列,时间"
Tables("表A").Filter = "第一列 is not null"
Dim d As Date
Dim r As Row
Dim r2 As Row = Tables("表A").Rows(0)
Dim idx As Integer = 0
Dim t As new timespan(0,0,0,0)
For i As Integer = 0 To Tables("表A").Rows.Count - 1
r = Tables("表A").Rows(i)
If r2("第一列") = r("第一列") Then
If r2("出入") = r("出入") Then
r2 = r
idx = 0
Continue For
ElseIf r.IsNull("时间") = False AndAlso r2.IsNull("时间") = False
If idx = 0 Then
r("第四列") = (cdate(r("时间")) - cdate(r2("时间"))).TotalSeconds
idx = 1
Else
r("第四列") = Nothing
End If
End If
Else
r2 = r
idx = 0
End If
Next