调试
For Each r As Row In Tables("员工满意分析细表").Rows
For Each c As Col In Tables("员工满意分析细表").Cols
msgbox(c.Caption & "," & c.Name)
If c.Caption Like "*_份数" Then
msgbox("部门='" & r("部门") & "' and 调查项目='" & c.Caption.Split("_")(0) & "'")
r(c.Name) = dt.GetValues("员工编号", "部门='" & r("部门") & "' and 调查项目='" & c.Caption.Split("_")(0) & "'").count
ElseIf c.Caption Like "*_平均分" Then
Dim cl As String = c.Caption.Split("_")(0)
msgbox("cl=" & cl & ",份数=" & r(dict(cl & "_份数")) & ",得分=" & r(dict(cl & "_得分")) )
If r(dict(cl & "_份数")) > 0 Then
r(c.Name) = r(dict(cl & "_得分"))
r(c.Name) = r(dict(cl & "_得分")) / r(dict(cl & "_份数"))
End If
End If
Next
Next