在“新”Google电子表格中,我希望监视特定单元格的内容,使其具有自动显示订单进度的“状态”单元格。
有谁能帮我编写一个脚本,根据单元格L8:L、R8:R、Y8:Y、a8:AA和AB8:AB的内容自动更改单元格K8:K的内容?
请原谅我的语法,我从没学过脚本语言.逻辑应该是这样的:
If L<>0 then K="Awaiting order"
If R<>0 or Q<>0 then K="In progress"
If AA<>0 and Y=0 then K="Sent for invoicing (docs incomplete)"
If AA<>0 and Y<>0 then K="Sent for invoicing (docs complete)"
If AB<>0 and Y<>0 then K="Closed (complete)"我使用"<>0“来表示单元格中已经输入了一些内容,并使用"=0”来表示单元格是空的。如果多个参数为真,则序列中的后一个参数应该优先。
回到我知道如何编程的时候,你可以用很多IF/ for语句来达到想要的优先级,但我现在真的不知道从哪里开始,除了Google,它在寻找如何完成复杂的Google电子表格任务的信息时,通常会带我到Stack溢出!
任何帮助都将受到感谢!
发布于 2015-02-06 15:11:19
诚然,这是一个公式,而不是脚本,但请在K8中尝试并复制以适应:
=if(and(AB8<>"",Y8<>""),"Closed (complete)",if(and(AA8<>"",Y8=""),"Sent for invoicing (docs complete)",if(and(AA8<>"",Y8<>""),"Sent for invoicing (docs incomplete)",if(R8<>"","In progress",if(L8<>"","Awaiting order","")))))https://stackoverflow.com/questions/28368404
复制相似问题