以文本方式查看主题

-  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
--  统计人数

 

 

请问在同一天,在岗人员列的所有人数,怎么统计出来呢?

 


此主题相关图片如下:23151611.png
按此在新窗口浏览图片

 

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
--  

统计出来不准确

 

 

 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:管理项目1.rar


--  作者:有点甜
--  发布时间: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
--  

还是不准确, 重名的也要统计进去

 

 


图片点击可在新窗口打开查看此主题相关图片如下:微信图片_20190529174826.png
图片点击可在新窗口打开查看
[此贴子已经被作者于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