我正在跟踪一本小孩子教科书的写作进度。本书共有20章,每章包含2个活动。负责人提出了5种类型的活动,并且由于有20个章节,我们必须确保每对类型的活动恰好出现两次。我们也不能写这两个活动属于同一类的章节。由于有多个作者,因此我打算解决的方法是在相邻行和另一行上记录每章的活动1和活动2,并有一个公式将其分类为“组合1-10”。我想到了这个,但是我得到了#ERROR!消息,当我将鼠标悬停在它上面时,显示“公式解析错误”。我试图查看是否可以找到错误,但没有找到。这是我的公式,
ifs(
or(
and(
G2="Avalie as afirmativas";
h2="Ligue os grupos"
);
and(
h2="Avalie as afirmativas";
g2="Ligue os grupos"
)
),"Combinação 1",
or(
and(
G2="Avalie as afirmativas";
h2="Desenhe alguma coisa"
);
and(
h2="Avalie as afirmativas";
g2="Desenhe alguma coisa"
)
),"Combinação 2",
or(
and(
G2="Avalie as afirmativas";
h2="Circule os desenhos"
);
and(
h2="Avalie as afirmativas";
g2="Circule os desenhos"
)
),"Combinação 3",
or(
and(
G2="Avalie as afirmativas";
h2="Colagem"
);
and(
h2="Avalie as afirmativas";
g2="Colagem"
)
),"Combinação 4",
or(
and(
G2="Desenhe alguma coisa";
h2="Ligue os grupos"
);
and(
h2="Desenhe alguma coisa";
g2="Ligue os grupos"
)
),"Combinação 5",
or(
and(
G2="Circule os desenhos";
h2="Ligue os grupos"
);
and(
h2="Circule os desenhos";
g2="Ligue os grupos"
)
),"Combinação 6",
or(
and(
G2="Colagem";
h2="Ligue os grupos"
);
and(
h2="Colagem";
g2="Ligue os grupos"
)
),"Combinação 7",
or(
and(
G2="Desenhe alguma coisa";
h2="Circule os desenhos"
);
and(
h2="Desenhe alguma coisa";
g2="Circule os desenhos"
)
),"Combinação 8",
or(
and(
G2="Desenhe alguma coisa";
h2="Colagem"
);
and(
h2="Desenhe alguma coisa";
g2="Colagem"
)
),"Combinação 9",
or(
and(
G2="Circule os desenhos";
h2="Colagem"
);
and(
h2="Circule os desenhos";
g2="Colagem"
)
),"Combinação 10")
我进行了一些挖掘,认为逗号和分号可能有用,但是这些似乎都是正确的,因此我的下一个猜测是IFS()不会将OR()作为参数,或者可能是OR()不使用AND()作为参数。我没有找到IFS教程,因此我想问一下。
编辑:由于时间限制,我最终使用了player0的解决方案,但深入研究后发现了问题所在:在我的国家/地区,我们使用逗号作为小数点分隔符。因此,工作表中任何公式中的每个参数都必须用分号分隔。因此,最后实际上是逗号和分号。有趣的是,由于我已经用英语配置了google,因此在正式的google表格支持页面上,公式中的参数用逗号分隔,分号是我在第三方教程中找到的内容,当我尝试使用该方法时才单击使用COUNTIF并得到完全相同的错误,并在工作表支持论坛上发现了一个问题,有人引用了该问题。谢谢你们的投入!
采用:
=ARRAYFORMULA(
IF((REGEXMATCH(G2:G; "Avalie as afirmativas|Ligue os grupos"))*
(REGEXMATCH(H2:H; "Avalie as afirmativas|Ligue os grupos")); "Combinação 1";
IF((REGEXMATCH(G2:G; "Avalie as afirmativas|Desenhe alguma coisa"))*
(REGEXMATCH(H2:H; "Avalie as afirmativas|Desenhe alguma coisa")); "Combinação 2";
IF((REGEXMATCH(G2:G; "Avalie as afirmativas|Circule os desenhos"))*
(REGEXMATCH(H2:H; "Avalie as afirmativas|Circule os desenhos")); "Combinação 3";
IF((REGEXMATCH(G2:G; "Avalie as afirmativas|Colagem"))*
(REGEXMATCH(H2:H; "Avalie as afirmativas|Colagem")); "Combinação 4";
IF((REGEXMATCH(G2:G; "Desenhe alguma coisa|Ligue os grupos"))*
(REGEXMATCH(H2:H; "Desenhe alguma coisa|Ligue os grupos")); "Combinação 5";
IF((REGEXMATCH(G2:G; "Circule os desenhos|Ligue os grupos"))*
(REGEXMATCH(H2:H; "Circule os desenhos|Ligue os grupos")); "Combinação 6";
IF((REGEXMATCH(G2:G; "Colagem|Ligue os grupos"))*
(REGEXMATCH(H2:H; "Colagem|Ligue os grupos")); "Combinação 7";
IF((REGEXMATCH(G2:G; "Desenhe alguma coisa|Circule os desenhos"))*
(REGEXMATCH(H2:H; "Desenhe alguma coisa|Circule os desenhos")); "Combinação 8";
IF((REGEXMATCH(G2:G; "Desenhe alguma coisa|Colagem"))*
(REGEXMATCH(H2:H; "Desenhe alguma coisa|Colagem")); "Combinação 9";
IF((REGEXMATCH(G2:G; "Circule os desenhos|Colagem"))*
(REGEXMATCH(H2:H; "Circule os desenhos|Colagem")); "Combinação 10";
)))))))))))
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句