以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  如何筛选出不重复行  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=58051)

--  作者:zhupengfei
--  发布时间:2014/10/10 16:38:00
--  如何筛选出不重复行
表A中第一列有很多内容一样的行,我想让A进行筛选,只保留不重复的行,如何写
--  作者:有点甜
--  发布时间:2014/10/10 16:42:00
--  

 参考

 

Tables("表A").RepeatFilter("第一列", 2)
DataTables("表A").DeleteFor(Tables("表A").Filter)
Tables("表A").Filter = ""


--  作者:Bin
--  发布时间:2014/10/10 16:42:00
--  
http://www.foxtable.com/help/topics/1478.htm


--  作者:有点甜
--  发布时间:2014/10/10 16:42:00
--  

 或者参考

 

Dim i As Integer
For i  = DataTables("表A").DataRows.Count-1 To 0 Step -1
    Dim dr As DataRow = DataTables("表A").DataRows(i)
    Dim dr2 As DataRow = DataTables("表A").Find("第一列=\'" & dr("第一列") & "\' and 第二列=\'" & dr("第二列") & "\' and _Identify <> " & dr("_Identify"))
    If dr2 IsNot Nothing Then
        dr2.Delete
    End If
Next