以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 统计人数 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=135369) |
||||
-- 作者:cyrollin -- 发布时间:2019/5/24 19:23:00 -- 统计人数
请问在同一天,在岗人员列的所有人数,怎么统计出来呢?
11个人 谢谢
|
||||
-- 作者:有点蓝 -- 发布时间:2019/5/24 19:55:00 -- 这种要遍历 dim lst as new List(of string) for each r as row in tables("表A").rows for each s as string in r("在岗人员").split(",") if lst.contains(s) = false then lst.add(s) next next msgbox(lst.count) |
||||
-- 作者:cyrollin -- 发布时间:2019/5/29 17:22:00 -- 统计出来不准确
|
||||
-- 作者:有点甜 -- 发布时间:2019/5/29 17:31:00 -- Dim lst As new List(of String) For Each r As Row In Tables("表A").rows For Each s As String In r("在岗人员").split(",") If s > "" AndAlso lst.contains(s) = False Then lst.add(s) Next Next Dim a As Integer = lst.count e.form.controls("label2").text = a |
||||
-- 作者:cyrollin -- 发布时间:2019/5/29 17:51:00 -- 还是不准确, 重名的也要统计进去
![]() ![]() [此贴子已经被作者于2019/5/29 17:51:34编辑过]
|
||||
-- 作者:有点甜 -- 发布时间:2019/5/29 18:02:00 -- Dim lst As new List(of String) For Each r As Row In Tables("表A").rows For Each s As String In r("在岗人员").split(",") If s > "" Then lst.add(s) Next Next Dim a As Integer = lst.count e.form.controls("label2").text = a |