以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 筛选统计问题 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=170415) |
||||
-- 作者:0855yangjing -- 发布时间:2021/7/25 20:09:00 -- 筛选统计问题 老师,我的表,筛选统计怎么编程,上传的表格里面,左边是数据表,右边是统计结果!
|
||||
-- 作者:有点蓝 -- 发布时间:2021/7/25 20:25:00 -- Dim r As Row Dim slit() As String = {"A","B","C","D"} Dim idx As Integer = 0 For Each s As String In DataTables("军工布置表").GetValues("军工布置") r = Tables("军工位置布置统计表").AddNew r("军工布置") = s Dim lst As List(of String) = DataTables("军工布置表").GetValues("位置代码","军工布置=\'" & s & "\'") Dim s1 As String = lst(0) Dim s2 As String = lst(0) For ias Integer = 1 To lst.Count - 1 If cint(s1)+1 <> cint(lst(i)) Then s2 = s2 & "--" & s1 r(slit(idx) & "号码") = s2 s2 = lst(i) idx += 1 End If s1 = lst(i) Next Next
|