以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- [求助]如何比较不同列的相同数据,自动补齐缺少的数据,并以显著的特殊颜色或字体标出来? (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=114703) |
-- 作者:旭日生 -- 发布时间:2018/2/13 21:35:00 -- [求助]如何比较不同列的相同数据,自动补齐缺少的数据,并以显著的特殊颜色或字体标出来? |
-- 作者:有点蓝 -- 发布时间:2018/2/13 22:16:00 -- Dim min As Integer = 180123110 Dim max As Integer = 180123116 Dim cnt As Integer = Tables("表A").Rows.Count Dim ct2 As Integer = cnt Tables("表A").AddNew(20) Dim str() As String = {"第一列","第二列","第三列","第四列"} For i As Integer = 0 To str.Length - 1 ct2 = cnt Dim lst As List(Of String) = DataTables("表A").GetValues(str(i),str(i) & " Is not null") For j As Integer = min To max If lst.Contains(cstr(j)) = False Tables("表A").Rows(ct2)(str(i)) = j ct2 += 1 End If Next Next
|