以文本方式查看主题

-  易表在线答疑  (http://egrid2000.com/dvbbs/index.asp)
--  用户社区  (http://egrid2000.com/dvbbs/list.asp?boardid=2)
----  这样的函数算几翻  (http://egrid2000.com/dvbbs/dispbbs.asp?boardid=2&id=27671)

--  作者:cnzayu
--  发布时间:2014/12/4 15:55:00
--  这样的函数算几翻

a#1@
b#2@
c#3@
d#4@
e#5@

这应该怎么写,有没有公式来套

比方下面的函数:

if([工种] = "机班长",if([班组] = "
1班组","⑴"+[姓名],if([班组] = "
2班组","⑵"+[姓名],if([班组] = "
3班组","⑶"+[姓名],if([班组] = "
5班组","⑸"+[姓名],if([班组] = "
6班组","⑹"+[姓名],if([班组] = "
7班组","⑺"+[姓名],""))))))

 

 

:⑴⑵为符号

[此贴子已经被作者于2014-12-4 16:14:15编辑过]

--  作者:smileboy
--  发布时间:2014/12/5 10:47:00
--  
有算番的帖子,你可以搜一下
--  作者:dancedy
--  发布时间:2014/12/8 8:13:00
--  

两番

 

Eval("if([工种] = ""机班长"",if([班组] = """ + Substitute(Substitute(Eval("Substitute(""|#|"",""|"",""" + Substitute("1|2|3|4|5|6|7","|",""") + ""@"" + Substitute(""|#|"",""|"",""") + """)"),"#","班组"",""("),"@",")""+[姓名],if([班组] = """) + ")""+[姓名],""""))))))")


--  作者:cnzayu
--  发布时间:2014/12/13 19:05:00
--  
if([工种] = "机班长",if([班组] = "
1班组","a"+[姓名],if([班组] = "
2班组","b"+[姓名],if([班组] = "
3班组","c"+[姓名],if([班组] = "
5班组","d"+[姓名],if([班组] = "
6班组","e"+[姓名],if([班组] = "
7班组","f"+[姓名],""))))))
假如上面这样的应该算几番?

--  作者:dancedy
--  发布时间:2014/12/15 10:29:00
--  

4楼的公式,语法不对,应为:

 

if([工种] = "机班长",if([班组] = "
1班组","a"+[姓名],if([班组] = "
2班组","b"+[姓名],if([班组] = "
3班组","c"+[姓名],if([班组] = "
5班组","d"+[姓名],if([班组] = "
6班组","e"+[姓名],if([班组] = "
7班组","f"+[姓名],"")))))),"")


--  作者:dancedy
--  发布时间:2014/12/15 10:31:00
--  

上面的公式可以等效于:

 

if([工种] = "机班长",if([班组] = "1班组",Mid("abcjdef",1-1,1)+[姓名],

                           if([班组] = "2班组",Mid("abcjdef",2-1,1)+[姓名],

                           if([班组] = "3班组",Mid("abcjdef",3-1,1)+[姓名],

                           if([班组] = "5班组",Mid("abcjdef",5-1,1)+[姓名],

                           if([班组] = "6班组",Mid("abcjdef",6-1,1)+[姓名],

                           if([班组] = "7班组",Mid("abcjdef",7-1,1)+[姓名],"")))))),"")

 

 

两番!

[此贴子已经被作者于2014-12-15 10:34:57编辑过]

--  作者:cnzayu
--  发布时间:2014/12/17 23:06:00
--  
谢谢老师