以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 最大值,最小值 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=119789) |
-- 作者:15528900289 -- 发布时间:2018/5/31 22:50:00 -- 最大值,最小值 求表a中数据列(A,B,C,D)中的最大值或者最小值显示在E列中 |
-- 作者:有点甜 -- 发布时间:2018/5/31 23:06:00 -- iif(A>B,iif(A>C,iif(A>D,A,D),iif(C>D,C,D)),iif(B>C,iif(B>D,B,D),iif(C>D,C,D))) |
-- 作者:15528900289 -- 发布时间:2018/6/2 20:52:00 -- 谢谢,用代码怎么实现尼,我的数据列很多,这个公式就很复杂,可以用数组来实现吗 |
-- 作者:15528900289 -- 发布时间:2018/6/2 21:06:00 -- 谢谢!我已经找到好一点的方法了 Dim n1 As Integer = e.DataRow("接收数量_木工组")
Dim n2 As Integer = e.DataRow("接收数量_打磨组") Dim n3 As Integer = e.DataRow("接收数量_油漆组") Dim n4 As Integer = e.DataRow("接收数量_装配组") Dim n5 As Integer = e.DataRow("接收数量_入库量") Dim n6 As Integer = e.DataRow("接收数量_发货量") Dim n7 As Integer = e.DataRow("接收数量_台盆计划") Dim n8 As Integer = e.DataRow("接收数量_关闭量") e.DataRow("max")=Math.Max(Math.Max(Math.Max(Math.Max(Math.Max(Math.Max(Math.Max(n1,n2),n3),n4),n5),n6),n7),n8) |
-- 作者:有点甜 -- 发布时间:2018/6/3 12:24:00 -- 可以看看
http://www.foxtable.com/bbs/dispbbs.asp?BoardID=2&ID=56992&skin=0
|