这样看看:
For Each dr1 As DataRow In DataTables("单位系数").DataRows
For Each dr2 As DataCol In DataTables("单位系数").DataCols
If dr1.IsNull("部门") Then
dr1(dr2.Name) = Nothing
Else
Dim pr As Double = DataTables("个人数据").Compute("Sum(系数_1)","[部门] = \'" & dr1("部门") & "\'")
dr1(dr2.Name) = pr
End If
Next
Next