我有一个重置页面的脚本,所以在脚本中,我有一个在工作表中使用的公式列表,重置工作表时必须保留这些公式。
当我添加以下公式并尝试保存脚本时,出现错误:元素列表后出现错误:'missing']'
//必须存在且未经篡改才能提交的公式。必要时进行调整
var sheetFormulas =
[
["C6", "=SUM(C5-G5)"],
["I10", "=SUM(B10:H10)"],
["I12", "=SUM(B12:H12)"],
["I13", "=SUM(B13:H13)"],
["I14", "=SUM(B14:H14)"],
["I15", "=SUM(B15:H15)"],
["I16", "=SUM(B16:H16)"],
["I18", "=SUM(B18:H18)"],
["I19", "=SUM(B19:H19)"],
["K10", "=-ROUND(I10/23*20,2)"],
["K12", "=-ROUND(I12/23*20,2)"],
["K13", "=ROUND(I13/23*20,2)"],
["K14", "=I14"]
["K15", "=ROUND(I15/23*20,2)"],
["K16", "=ROUND(I16/23*20,2)"],
["K18", "=I18"],
["K19", "=I19"],
["L10", "=-ROUND(I10/23*3,2)"],
["L12", "=-ROUND(I12/23*3,2)"],
["L13", "=ROUND(I13/23*3,2)"],
["L15", "=ROUND(I15/23*3,2)"],
["L16", "=ROUND(I16/23*3,2)"],
["I25", "=SUM(I10-I12-I13-I14-I15-I16)"],
["I27", "=SUM(C6+I10-I13-I14-I15-I16-I17+I19-I20)"],
["I31", "=ROUND(SUM(I29-I27),2)"],
["L27", "=SUM(I18-I19)"],
["I33", "=SUM(B33:H33)"],
["I34", "=SUM(B34:H34)"],
["I35", "=SUM(B35:H35)"],
["I36", "=SUM(B36:H36)"],
["B20","=IF(B18>49.99,"Enter Name",IF(B19>49.99,"Enter Name",""))"],
["C20","=IF(C18>49.99,"Enter Name",IF(C19>49.99,"Enter Name",""))"],
["D20","=IF(D18>49.99,"Enter Name",IF(D19>49.99,"Enter Name",""))"],
["E20","=IF(E18>49.99,"Enter Name",IF(E19>49.99,"Enter Name",""))"],
["F20","=IF(F18>49.99,"Enter Name",IF(F19>49.99,"Enter Name",""))"],
["G20","=IF(G18>49.99,"Enter Name",IF(G19>49.99,"Enter Name",""))"],
["H20","=IF(H18>49.99,"Enter Name",IF(H19>49.99,"Enter Name",""))"]
]`
我不知道丢失的]到哪里。
工作表中的公式似乎只能使用“ not”。它会根据IF条件将文本输入到单元格中。
答案 0 :(得分:0)
您在["K14", "=I14"],
处缺少逗号。这可能是错误的真正原因,以及有关转义双引号(\"
)的注释