以文本方式查看主题

-  易表在线答疑  (http://egrid2000.com/dvbbs/index.asp)
--  用户社区  (http://egrid2000.com/dvbbs/list.asp?boardid=2)
----  [求助]求助一个公式。可能有些难。  (http://egrid2000.com/dvbbs/dispbbs.asp?boardid=2&id=26729)

--  作者:沙尘豹
--  发布时间:2013/11/28 23:16:00
--  [求助]求助一个公式。可能有些难。

求助一个公式,结果表 0至9列 从 数据列 自动填充。

竖向挨着3个或3个以上,背景变红色。

斜向也是挨着3个或3个以上,背景变红色,如1,2,3  大斜。3,2,1不算。

 

可能有上万行,这50行是我手工弄的。

先谢谢老师:老师您辛苦了!如有密码:645509

 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:学习表.egd

[此贴子已经被作者于2013-11-28 23:16:54编辑过]

--  作者:lyang70
--  发布时间:2013/11/29 11:42:00
--  

1、填充数据好解决:0-9列刷新公式用If(Instr(ColName,[数据]) >= 0,ColName,"")

2、按上述逻辑设置背景色,这个我是没有好办法解决...


--  作者:wjq1072
--  发布时间:2013/11/29 12:25:00
--  

可以做一个按钮公式(0-9列的列名称更改为:00-09)如下:

EvalFor(GridName,"00","If(Instr(""0"",[数据])>-1,""0"","""")") And EvalFor(GridName,"p","Cell(Row,""00"")=""0"" And Cell(Row-1,""00"")=""0"" And Cell(Row-2,""00"")=""0"" Or Cell(Row,""00"")=""0"" And Cell(Row-1,""00"")=""0"" And Cell(Row+1,""00"")=""0"" Or Cell(Row,""00"")=""0"" And Cell(Row+1,""00"")=""0"" And Cell(Row+2,""00"")=""0""") And MarkColFor("00",255,0,"p","=",-1) And EvalFor(GridName,"01","If(Instr(""1"",[数据])>-1,""1"","""")") And EvalFor(GridName,"p","Cell(Row,""01"")=""1"" And Cell(Row-1,""01"")=""1"" And Cell(Row-2,""01"")=""1"" Or Cell(Row,""01"")=""1"" And Cell(Row-1,""01"")=""1"" And Cell(Row+1,""01"")=""1"" Or Cell(Row,""01"")=""1"" And Cell(Row+1,""01"")=""1"" And Cell(Row+2,""01"")=""1""") And MarkColFor("01",255,0,"p","=",-1) And EvalFor(GridName,"02","If(Instr(""2"",[数据])>-1,""2"","""")") And EvalFor(GridName,"p","Cell(Row,""02"")=""2"" And Cell(Row-1,""02"")=""2"" And Cell(Row-2,""02"")=""2"" Or Cell(Row,""02"")=""2"" And Cell(Row-1,""02"")=""2"" And Cell(Row+1,""02"")=""2"" Or Cell(Row,""02"")=""2"" And Cell(Row+1,""02"")=""2"" And Cell(Row+2,""02"")=""2""") And MarkColFor("02",255,0,"p","=",-1) And EvalFor(GridName,"03","If(Instr(""3"",[数据])>-1,""3"","""")") And EvalFor(GridName,"p","Cell(Row,""03"")=""3"" And Cell(Row-1,""03"")=""3"" And Cell(Row-2,""03"")=""3"" Or Cell(Row,""03"")=""3"" And Cell(Row-1,""03"")=""3"" And Cell(Row+1,""03"")=""3"" Or Cell(Row,""03"")=""3"" And Cell(Row+1,""03"")=""3"" And Cell(Row+2,""03"")=""3""") And MarkColFor("03",255,0,"p","=",-1) And EvalFor(GridName,"04","If(Instr(""4"",[数据])>-1,""4"","""")") And EvalFor(GridName,"p","Cell(Row,""04"")=""4"" And Cell(Row-1,""04"")=""4"" And Cell(Row-2,""04"")=""4"" Or Cell(Row,""04"")=""4"" And Cell(Row-1,""04"")=""4"" And Cell(Row+1,""04"")=""4"" Or Cell(Row,""04"")=""4"" And Cell(Row+1,""04"")=""4"" And Cell(Row+2,""04"")=""4""") And MarkColFor("04",255,0,"p","=",-1) And EvalFor(GridName,"05","If(Instr(""5"",[数据])>-1,""5"","""")") And EvalFor(GridName,"p","Cell(Row,""05"")=""5"" And Cell(Row-1,""05"")=""5"" And Cell(Row-2,""05"")=""5"" Or Cell(Row,""05"")=""5"" And Cell(Row-1,""05"")=""5"" And Cell(Row+1,""05"")=""5"" Or Cell(Row,""05"")=""5"" And Cell(Row+1,""05"")=""5"" And Cell(Row+2,""05"")=""5""") And MarkColFor("05",255,0,"p","=",-1) And EvalFor(GridName,"06","If(Instr(""6"",[数据])>-1,""6"","""")") And EvalFor(GridName,"p","Cell(Row,""06"")=""6"" And Cell(Row-1,""06"")=""6"" And Cell(Row-2,""06"")=""6"" Or Cell(Row,""06"")=""6"" And Cell(Row-1,""06"")=""6"" And Cell(Row+1,""06"")=""6"" Or Cell(Row,""06"")=""6"" And Cell(Row+1,""06"")=""6"" And Cell(Row+2,""06"")=""6""") And MarkColFor("06",255,0,"p","=",-1) And EvalFor(GridName,"07","If(Instr(""7"",[数据])>-1,""7"","""")") And EvalFor(GridName,"p","Cell(Row,""07"")=""7"" And Cell(Row-1,""07"")=""7"" And Cell(Row-2,""07"")=""7"" Or Cell(Row,""07"")=""7"" And Cell(Row-1,""07"")=""7"" And Cell(Row+1,""07"")=""7"" Or Cell(Row,""07"")=""7"" And Cell(Row+1,""07"")=""7"" And Cell(Row+2,""07"")=""7""") And MarkColFor("07",255,0,"p","=",-1) And EvalFor(GridName,"08","If(Instr(""8"",[数据])>-1,""8"","""")") And EvalFor(GridName,"p","Cell(Row,""08"")=""8"" And Cell(Row-1,""08"")=""8"" And Cell(Row-2,""08"")=""8"" Or Cell(Row,""08"")=""8"" And Cell(Row-1,""08"")=""8"" And Cell(Row+1,""08"")=""8"" Or Cell(Row,""08"")=""8"" And Cell(Row+1,""08"")=""8"" And Cell(Row+2,""08"")=""8""") And MarkColFor("08",255,0,"p","=",-1) And EvalFor(GridName,"09","If(Instr(""9"",[数据])>-1,""9"","""")") And EvalFor(GridName,"p","Cell(Row,""09"")=""9"" And Cell(Row-1,""09"")=""9"" And Cell(Row-2,""09"")=""9"" Or Cell(Row,""09"")=""9"" And Cell(Row-1,""09"")=""9"" And Cell(Row+1,""09"")=""9"" Or Cell(Row,""09"")=""9"" And Cell(Row+1,""09"")=""9"" And Cell(Row+2,""09"")=""9""") And MarkColFor("09",255,0,"p","=",-1) And EvalFor(GridName,"p","Cell(Row,""00"")=""0"" And Cell(Row+1,""01"")=""1"" And Cell(Row+2,""02"")=""2""") And MarkColFor("00",255,0,"p","=",-1) And EvalFor(GridName,"p","Cell(Row,""01"")=""1"" And Cell(Row-1,""00"")=""0"" And Cell(Row+1,""02"")=""2"" Or Cell(Row,""01"")=""1"" And Cell(Row+1,""02"")=""2"" And Cell(Row+2,""03"")=""3""") And MarkColFor("01",255,0,"p","=",-1) And EvalFor(GridName,"p","Cell(Row,""02"")=""2"" And Cell(Row-1,""01"")=""1"" And Cell(Row+1,""03"")=""3"" Or Cell(Row,""02"")=""2"" And Cell(Row+1,""03"")=""3"" And Cell(Row+2,""04"")=""4"" Or Cell(Row,""02"")=""2"" And Cell(Row-1,""01"")=""1"" And Cell(Row-2,""00"")=""0""") And MarkColFor("02",255,0,"p","=",-1) And EvalFor(GridName,"p","Cell(Row,""03"")=""3"" And Cell(Row-1,""02"")=""2"" And Cell(Row+1,""04"")=""4"" Or Cell(Row,""03"")=""3"" And Cell(Row+1,""04"")=""4"" And Cell(Row+2,""05"")=""5"" Or Cell(Row,""03"")=""3"" And Cell(Row-1,""02"")=""2"" And Cell(Row-2,""01"")=""1""") And MarkColFor("03",255,0,"p","=",-1) And EvalFor(GridName,"p","Cell(Row,""04"")=""4"" And Cell(Row-1,""03"")=""3"" And Cell(Row+1,""05"")=""5"" Or Cell(Row,""04"")=""4"" And Cell(Row+1,""05"")=""5"" And Cell(Row+2,""06"")=""6"" Or Cell(Row,""04"")=""4"" And Cell(Row-1,""03"")=""3"" And Cell(Row-2,""02"")=""2""") And MarkColFor("04",255,0,"p","=",-1) And EvalFor(GridName,"p","Cell(Row,""05"")=""5"" And Cell(Row-1,""04"")=""4"" And Cell(Row+1,""06"")=""6"" Or Cell(Row,""05"")=""5"" And Cell(Row+1,""06"")=""6"" And Cell(Row+2,""07"")=""7"" Or Cell(Row,""05"")=""5"" And Cell(Row-1,""04"")=""4"" And Cell(Row-2,""03"")=""3""") And MarkColFor("05",255,0,"p","=",-1) And EvalFor(GridName,"p","Cell(Row,""06"")=""6"" And Cell(Row-1,""05"")=""5"" And Cell(Row+1,""07"")=""7"" Or Cell(Row,""06"")=""6"" And Cell(Row+1,""07"")=""7"" And Cell(Row+2,""08"")=""8"" Or Cell(Row,""06"")=""6"" And Cell(Row-1,""05"")=""5"" And Cell(Row-2,""04"")=""4""") And MarkColFor("06",255,0,"p","=",-1) And EvalFor(GridName,"p","Cell(Row,""07"")=""7"" And Cell(Row-1,""06"")=""6"" And Cell(Row+1,""08"")=""8"" Or Cell(Row,""07"")=""7"" And Cell(Row+1,""08"")=""8"" And Cell(Row+2,""09"")=""9"" Or Cell(Row,""07"")=""7"" And Cell(Row-1,""06"")=""6"" And Cell(Row-2,""05"")=""5""") And MarkColFor("07",255,0,"p","=",-1) And EvalFor(GridName,"p","Cell(Row,""08"")=""8"" And Cell(Row-1,""07"")=""7"" And Cell(Row+1,""09"")=""9"" Or Cell(Row,""08"")=""8"" And Cell(Row-1,""07"")=""7"" And Cell(Row-2,""06"")=""6""") And MarkColFor("08",255,0,"p","=",-1) And EvalFor(GridName,"p","Cell(Row,""09"")=""9"" And Cell(Row-1,""08"")=""8"" And Cell(Row-2,""07"")=""7""") And MarkColFor("09",255,0,"p","=",-1)


--  作者:沙尘豹
--  发布时间:2013/11/29 13:51:00
--  

多谢两位老师。研究学习中。

[此贴子已经被作者于2013-11-29 14:15:50编辑过]

--  作者:wjq1072
--  发布时间:2013/11/29 15:49:00
--  
 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:学习表.egd


--  作者:沙尘豹
--  发布时间:2013/11/30 11:29:00
--  

谢谢老师编辑这么长的公式,我知道很难的。60多行的公式,错一个小点,一个空格,公式都不能运算。

 

老师有强大的逻辑思维,严谨的态度,超级的耐心,才能编辑这么长这么复杂的公式。

 

我看到公式彻底蒙圈了,老师又给发了现成的 表。真心的感谢。

 

我在表的选项点 公式管理器 只有表预处理公式。在窗口选项点 设计录入窗口 也没有找到公式。

 

那么 这么长的公式在哪里呢? 我想套用老师的公式,或改动公式里一部分另作表要以下结果。

 (表1) 如果我只想要 竖向挨着3个或3个以上,背景变红色。

 (表2)斜向也是挨着3个或3个以上,背景变红色 ,这回我不要1,2,3变红色了,我要3,2,1背景变红色。

 (表3)把表1和表2的结果合并。就是竖向挨着3个或3个以上,背景变红色,斜向也是挨着3个或3个以上

背景变红色,3,2,1背景变红色,小斜。

 

请老师指点,在哪里可以找到老师的公式,为什么公式管理器里 只有表预处理公式OpenWindow(1) And Do(503)

 

不会这一个公式全搞定了吧。那么长的公式在哪里呢?

 

学会举一反三,就不用经常麻烦老师了。

[此贴子已经被作者于2013-11-30 11:39:33编辑过]

--  作者:igvkujn
--  发布时间:2013/11/30 12:49:00
--  

这个真难,看都看不懂

 


--  作者:wjq1072
--  发布时间:2013/11/30 13:33:00
--  
以下是引用沙尘豹在2013-11-30 11:29:00的发言:

谢谢老师编辑这么长的公式,我知道很难的。60多行的公式,错一个小点,一个空格,公式都不能运算。

 

老师有强大的逻辑思维,严谨的态度,超级的耐心,才能编辑这么长这么复杂的公式。

 

我看到公式彻底蒙圈了,老师又给发了现成的 表。真心的感谢。

 

我在表的选项点 公式管理器 只有表预处理公式。在窗口选项点 设计录入窗口 也没有找到公式。

 

那么 这么长的公式在哪里呢? 我想套用老师的公式,或改动公式里一部分另作表要以下结果。

 (表1) 如果我只想要 竖向挨着3个或3个以上,背景变红色。

 (表2)斜向也是挨着3个或3个以上,背景变红色 ,这回我不要1,2,3变红色了,我要3,2,1背景变红色。

 (表3)把表1和表2的结果合并。就是竖向挨着3个或3个以上,背景变红色,斜向也是挨着3个或3个以上

背景变红色,3,2,1背景变红色,小斜。

 

请老师指点,在哪里可以找到老师的公式,为什么公式管理器里 只有表预处理公式OpenWindow(1) And Do(503)

 

不会这一个公式全搞定了吧。那么长的公式在哪里呢?

 

学会举一反三,就不用经常麻烦老师了。

===================================

按钮公式在哪里都不知道?打开窗口设计、双击按钮看看!

[此贴子已经被作者于2013-11-30 11:39:33编辑过]


--  作者:沙尘豹
--  发布时间:2013/11/30 19:55:00
--  

不瞒老师,我是菜鸟一个。只会简单的,还没用过录入窗口,老师一指点,就找到了。

 

之后在用户指南里也看到了,看来我以前看的还不够细心,基础知识还欠缺。

 

真心的感谢老师编辑这么长得公式给我。