弄死,还以为是各个分数段人次……还傻傻的累加一次……
代码加在最后便可。
注意,分数段、加n分,列变成数值类型Dim dt_source As DataTable = DataTables("市级1分段")
For Each Km As String In Kms
For Each bb As String In bbs
Dim t As Table = Tables(Km & tjnj &"级"& bb &"前 N 名")
For Each r As Row In t.Rows
Dim gw As Integer = CInt(r("总分")) Mod 10
Dim fsd As Integer = CInt(r("总分")) - gw
Dim fdr As DataRow = dt_source.Find("分数段 = " & fsd)
If fdr IsNot Nothing Then
r("市一诊名次") = fdr("加" & gw & "分")
End If
Next
Next
Next
[此贴子已经被作者于2013-2-25 10:58:21编辑过]