Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/excel/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Excel 这些数组公式不';行不通_Excel_Excel Formula - Fatal编程技术网

Excel 这些数组公式不';行不通

Excel 这些数组公式不';行不通,excel,excel-formula,Excel,Excel Formula,以下两个数组“if或”公式在Google工作表中都有效,但在Excel中不起作用。你能帮我把它们改写成Excel吗 =ArrayFormula(if({or( Plans!$E$2:$E$9=R2,Plans!$F$2:$F$9=R2,Plans!$G$2:$G$7=R2, Plans!$H$2:$H$7=R2,Plans!$I$2:$I$3=R2,Plans!$J$2=R2)}, $AA$1,$Z$1)) =ARRAYF

以下两个数组“if或”公式在Google工作表中都有效,但在Excel中不起作用。你能帮我把它们改写成Excel吗

=ArrayFormula(if({or(
            Plans!$E$2:$E$9=R2,Plans!$F$2:$F$9=R2,Plans!$G$2:$G$7=R2,
            Plans!$H$2:$H$7=R2,Plans!$I$2:$I$3=R2,Plans!$J$2=R2)},
            $AA$1,$Z$1))

=ARRAYFORMULA(if(or(R2=Plans!$E$2:$J$2),
               Plans!$A$2,if(or(Plans!$E$3:$I$3=R2),Plans!$A$3,
               if(or(Plans!$E$4:$H$4=R2),Plans!$A$4,
               if(or(Plans!$E$8:$F$8=R2),Plans!$A$8," ")))))

我相信只要第一个被修复,就能帮助我修复第二个

Excel中的数组公式:

  • 不要使用=数组作为公式;及
  • 必须使用Ctrl-Shift-Enter键输入(您不能自己输入花括号)
您只需删除“ArrayFormula()”,然后在键入后按Ctrl+Alt+Enter。如果再次单击单元格并查看它,您将在公式栏中看到花括号

你打字

=if(or(Plans!$E$2:$E$9=R2,Plans!$F$2:$F$9=R2,Plans!$G$2:$G$7=R2,
        Plans!$H$2:$H$7=R2,Plans!$I$2:$I$3=R2,Plans!$J$2=R2),
        $AA$1,$Z$1)
然后单击Ctrl+Shift+Enter;Excel将返回:

{=if(or(Plans!$E$2:$E$9=R2,Plans!$F$2:$F$9=R2,Plans!$G$2:$G$7=R2,
        Plans!$H$2:$H$7=R2,Plans!$I$2:$I$3=R2,Plans!$J$2=R2),
        $AA$1,$Z$1)}

是否有什么东西阻止我们使用单一的、连续的范围E2:J9?也就是说,R2中的值是否会出现在当前公式中未引用的该范围内的单元格中,即G8:G9、H8:H9、I4:I9、J3:J9,因此可能会产生错误的结果?@XORLX如果在该范围内找不到该值,则应给出一个具有特定值的假字段z1。问题在于,与mac或windows excel相比,google工作表对数组的处理方式有所不同。乔纳森能够纠正我的错误。谢谢你看这个问题。谢谢你能给我正确的答案。我用的是mac,所以按键组合是CONTROL+SHIFT+ENTER。它帮我解决了这个复杂的问题,所以我真的很感激它=if(B2=$AA$1,数组形式)(if(左(U2,2)=“Mr”,IFERROR(VLOOKUP(A2,MrExports!$L$2:$R$2597,7,0),“”),if(左(V2,2)=“Ms”,IFERROR(VLOOKUP(A2,MsExports!$L$2:$R$3300,7,0),“”),VLOOKUP(A2,SUBIDS!$A$2:$C$17861,3,0)),“”)