Rss & SiteMap
Foxtable(狐表) http://www.foxtable.com
表A中一共有11列其中用逻辑列隔开(逻辑列有可能是正常列也有可能是公式列)当第一个逻辑列成对号后之前的单元格会变成颜色不是前面整列弯如何实现 亲亲们
下载信息 [文件大小: 下载次数: ] | |
![]() |
不懂你的问题,例子中也没有任何数据,:“逻辑列成对号后”怎么理解? 我笨啊。
楼上的代码在列位置固定的时候很好用! 下面的可以随便拖动“逻辑列”到任何位置。
Dim n1,n2,n3 As Integer
n1 = Tables("表A").cols(e.Col.Name).Index
n2 = Tables("表A").cols("第四列").Index
n3 = Tables("表A").cols("第十一列").Index
If n3 > n2
If e.Row("第四列") = True And n1 < n2
e.style = "zs"
End If
If e.Row("第十一列") = True
If n2 < n1 And n1 < n3
e.style = "sz"
End If
End If
Else
If e.Row("第四列") = True And n1 < n3
e.style = "sz"
End If
If e.Row("第十一列") = True
If n3 < n1 And n1 < n2
e.style = "zs"
End If
End If
End If
Dim n1,n2,n3 As Integer
n1 = Tables("表A").cols(e.Col.Name).Index
n2 = Tables("表A").cols("第四列").Index
n3 = Tables("表A").cols("第十一列").Index
If n3 > n2
If e.Row("第四列") = True And n1 < n2
e.style = "zs"
End If
If e.Row("第十一列") = True
If n2 < n1 And n1 < n3
e.style = "sz"
End If
End If
Else
If e.Row("第四列") = True And n1 < n3
e.style = "sz"
End If
If e.Row("第十一列") = True
If n3 < n1 And n1 < n2
e.style = "zs"
End If
End If
End If
这个代码运行起来会出现 如图