Foxtable(狐表)用户栏目专家坐堂 → [求助] 根据两例的值进行递增减


  共有2610人关注过本帖树形打印复制链接

主题:[求助] 根据两例的值进行递增减

帅哥哟,离线,有人找我吗?
有点色
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:13837 积分:69650 威望:0 精华:0 注册:2016/11/1 14:42:00
  发帖心情 Post By:2017/5/28 9:49:00 [显示全部帖子]

Dim t As Table = Tables("表B")
Dim max As Integer = 0
Dim idx As Integer = 0
Dim cs As new List(Of String)
For Each c As Col In t.cols
    If c.Name.StartsWith("第") Then
        Dim count As Integer = t.Compute("count(" & c.name & ")", c.name & " is not null")
        If count > max Then
            max = count
            idx = cs.count
        End If
        cs.add(c.name)
    End If
Next
msgbox(idx)
For i As Integer = 0 To cs.count-1
    If i <> idx Then
        For Each r As Row In t.rows
            r(cs(i)) = r(cs(idx)) - val(r("第十列"))*(idx-i)
        Next
    End If
Next

 回到顶部