以文本方式查看主题 - 易表在线答疑 (http://egrid2000.com/dvbbs/index.asp) -- 用户社区 (http://egrid2000.com/dvbbs/list.asp?boardid=2) ---- [求助]列刷新公式 (http://egrid2000.com/dvbbs/dispbbs.asp?boardid=2&id=23175) |
||||
-- 作者:cqlpjks -- 发布时间:2012/11/30 16:16:00 -- [求助]列刷新公式 要想在“完成”列填充 <= “目标”列的“全县合计”栏即“152”,并且“单位”=“单位”。怎样设置列刷新公式?请指教。谢谢!
此主题相关图片如下:求助刷新公式.jpg
[此贴子已经被作者于2012-11-30 16:40:00编辑过]
|
||||
-- 作者:wjq1072 -- 发布时间:2012/11/30 16:34:00 -- 这样提问是没法回答的! |
||||
-- 作者:cqlpjks -- 发布时间:2012/11/30 16:41:00 -- 文件传上来了,谢谢! 文件中的目标任务跟踪表 [此贴子已经被作者于2012-11-30 16:41:57编辑过]
|
||||
-- 作者:wjq1072 -- 发布时间:2012/11/30 17:51:00 --
|
||||
-- 作者:cqlpjks -- 发布时间:2012/12/1 11:04:00 -- 谢谢! “完成”列的刷新公式: CountFor("文科成绩","名次"," <= ",[文科_重点_A级_目标],"单位"," = ",[单位]) 这样要不得,我早就试过。我原来的公式是: CountFor("文科成绩","名次"," <= ",152,"单位"," = ",[单位]) 我是想改进一下,将公式中的“152” (即“目标”列的“全县合计”栏,与单位无关) 变为动态的,如统计2014级时就变成“150”了,统计2015级时就变成“159”了。2013级的正确统计结果应是: 而不是: 此主题相关图片如下:未命名1.jpg [此贴子已经被作者于2012-12-1 11:05:39编辑过]
|
||||
-- 作者:wjq1072 -- 发布时间:2012/12/1 14:02:00 -- 看不懂! |
||||
-- 作者:cqlpjks -- 发布时间:2012/12/1 21:26:00 -- CountFor("文科成绩","名次"," <= ",“152”,"单位"," = ",[单位]) “152”就是取“目标”列的“全县合计”栏(即表中红色单元格)的值,而红色单元格的值来自于“目标任务”表中FindText("目标任务","文科_重点_A级","单位"," = ","全县合计","年级"," = ",[年级])。 此主题相关图片如下:未命名2.jpg [此贴子已经被作者于2012-12-1 22:29:45编辑过]
|
||||
-- 作者:cqlpjks -- 发布时间:2012/12/2 10:07:00 -- 变量设置中的变量在列刷新公式中有效吗? 变量:%F%=FindText("目标任务","文科_重点_A级","单位"," = ","全县合计","年级"," = ",[年级]) “目标任务跟踪表”中“文科_重点_A级_完成”列的刷新公式设为:CountFor("文科成绩","名次"," <= ",[%F%],"单位"," = ",[单位]) 怎么不得行,如何修改代码?请指教。谢谢! |
||||
-- 作者:wjq1072 -- 发布时间:2012/12/2 10:14:00 --
|
||||
-- 作者:cqlpjks -- 发布时间:2012/12/2 11:03:00 -- 谢谢!这个问题解决了。但列刷新公式 If([单位]="全县合计",FindText("目标任务","文科_重点_A级","单位"," = ",[单位],"年级"," = ",[年级]),Eval("CountFor(""文科成绩"",""名次"",""<="","+Text(FindText(GridName,"文科_重点_A级_完成","单位"," = ","全县合计"))+",""单位"",""="",[单位])")) 应改为 If([单位]="全县合计",CountFor("文科成绩","名次"," <= ",[文科_重点_A级_目标]),Eval("CountFor(""文科成绩"",""名次"",""<="","+Text(FindText(GridName,"文科_重点_A级_目标","单位"," = ","全县合计"))+",""单位"",""="",[单位])")) 那用不着在变量设置中设置%F%了。 [此贴子已经被作者于2012-12-2 11:46:02编辑过]
|