ArrayFormula and “AND” Formula in Google Sheets

后端 未结 1 1496
孤独总比滥情好
孤独总比滥情好 2020-12-28 13:45

In Google Sheets, when using ArrayFormula with AND formula, I don\'t get the results as it should be.

A|B
2|7

In C1 I put form

1条回答
  •  礼貌的吻别
    2020-12-28 14:14

    AND doesn't work with that way with Array formulae because it ANDs the whole array together in the top left cell of the regardless of number of dimensions.

    I.e. it checks if "">"" which is FALSE, ANDed with anything it will return FALSE for the top left cell, that result is carried down.

    You can use multiplication of truth values to create ANDing that works with ARRAYFORMULA like this:

    =ArrayFormula((A1:A>1)*(B1:B>6) = 1)
    

    The OR equivalent would obviously be

    =ArrayFormula((A1:A>1)+(B1:B>6) > 0)
    

    0 讨论(0)
提交回复
热议问题