简体   繁体   中英

Google Spreadsheet Arrayformula for multiple columns conditions

I'm new on google spreadsheets, and I'm having this little problem:

I need to Sum values from column K (a project), for an specified person in cell B3, where the project belongs to the category RF or RM in column C, I've tried this but returns the sum of K like not conditions where applied...

=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))

Also

=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 anyone who can help me with this simple issue.

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

What I did was 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 clear it up.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM