excel 一个公式中包含多个IF条件

nfeuvbwi  于 2023-03-04  发布在  其他
关注(0)|答案(1)|浏览(115)

嗨,我是新的Excel从谷歌工作表。我能够做到这一点,在谷歌工作表确定,但有麻烦试图找出Excel。我想把所有这些到一个公式。

=IF(AND(B50="Buy",C50="Call"),FILTER(Sheet1!S6:S31,(Sheet1!U6:U31=E50)*((Sheet1!Q6:Q31=A50)*((Sheet1!R6:R31=C50)))))
    =IF(AND(B50="Buy",C50="Put"),FILTER(Sheet1!S6:S31,(Sheet1!U6:U31=E50)*((Sheet1!Q6:Q31=A50)*((Sheet1!R6:R31=C50)))))
    =IF(AND(B50="Sell",C50="Call"),FILTER(Sheet1!T6:T31,(Sheet1!U6:U31=E50)*((Sheet1!Q6:Q31=A50)*((Sheet1!R6:R31=C50)))))
    =IF(AND(B50="Sell",C50="Put"),FILTER(Sheet1!T6:T31,(Sheet1!U6:U31=E50)*((Sheet1!Q6:Q31=A50)*((Sheet1!R6:R31=C50)))))

Excel帮助窗口将上面的代码更正为下面的片段,但得到“值”错误。每个查询单独工作正常,只是,的和)))的问题,当我把它们放在一起。

=IF(AND(B50="Buy",C50="Call"),FILTER(Sheet1!S6:S31,(Sheet1!U6:U31=E50)*((Sheet1!Q6:Q31=A50)*((Sheet1!R6:R31=C50,
IF(AND(B50="Buy",C50="Put"),FILTER(Sheet1!S6:S31,(Sheet1!U6:U31=E50)*((Sheet1!Q6:Q31=A50)*((Sheet1!R6:R31=C50,
IF(AND(B50="Sell",C50="Call"),FILTER(Sheet1!T6:T31,(Sheet1!U6:U31=E50)*((Sheet1!Q6:Q31=A50)*((Sheet1!R6:R31=C50,
IF(AND(B50="Sell",C50="Put"),FILTER(Sheet1!T6:T31,(Sheet1!U6:U31=E50)*((Sheet1!Q6:Q31=A50)*((Sheet1!R6:R31=C50))))))))))))))))))))
anauzrmj

anauzrmj1#

你把支架放错了。试试-

=IF(AND(B50="Buy",C50="Call"),FILTER(Sheet1!S6:S31,(Sheet1!U6:U31=E50)*(Sheet1!Q6:Q31=A50)*(Sheet1!R6:R31=C50)),
IF(AND(B50="Buy",C50="Put"),FILTER(Sheet1!S6:S31,(Sheet1!U6:U31=E50)*(Sheet1!Q6:Q31=A50)*(Sheet1!R6:R31=C50)),
IF(AND(B50="Sell",C50="Call"),FILTER(Sheet1!T6:T31,(Sheet1!U6:U31=E50)*(Sheet1!Q6:Q31=A50)*(Sheet1!R6:R31=C50)),
IF(AND(B50="Sell",C50="Put"),FILTER(Sheet1!T6:T31,(Sheet1!U6:U31=E50)*(Sheet1!Q6:Q31=A50)*(Sheet1!R6:R31=C50)),""))))

相关问题