If e.DataCol.Name = "第二列" Then Dim fdr As DataRow = e.DataTable.Find("第一列 = '" & e.DataRow("第二列") & "' and _Identify <= " & e.DataRow("_Identify"), "_Identify desc") If fdr IsNot Nothing Then e.DataRow("第三列") = Tables(e.DataTable.Name).Current.Index - Tables(e.DataTable.Name).FindRow(fdr) Else e.DataRow("第三列") = Nothing End If End If