Google Spreadsheet Arrayformula for multi-column conditions

I am new to Google spreadsheets and I have this little problem:

I need to sum the values ​​from column K (project), for the specified person in cell B3, where the project is categorized as RF or RM in column C, I tried this, but returned the sum K as and not the conditions in which it applies ...

=arrayformula(if(AND('SheetX'!I$3:I=B3;OR('SheetX'!C$3:C="RF";'SheetX'!C$3:C="RM"));sum('SheetX'!K$3:K);0)) 

Besides

 =arrayformula(Sum(if(AND('SheetX'!I$3:I=B3;OR('SheetX'!C$3:C="RF";'SheetX'!C$3:C="RM"));'SheetX'!K$3:K;0))) 

Thanks to everyone who can help me with this simple problem.

+4
source share
1 answer

Already fixed. According to this link β€œThe OR function does not work in the array expression (the AND function also does not work, but the NOT function does). The workaround is to use ADD instead of OR and MULTIPLY instead of AND, and for practical reasons, use the + operator associated with the ADD and the operator * related to MULTIPLY. "

I have done this:

 =Sum(filter('SheetX'!K$3:K;'SheetX'!I$3:I=B3;('SheetX'!C$3:C="RF")+('SheetX'!C$3:C="RM"))) 

Thanks to this video that cleans it.

+3
source

Source: https://habr.com/ru/post/1492844/


All Articles