Is there a way to SUMIFS based on a condition for a output range?

徘徊边缘 提交于 2020-01-25 03:14:11

问题


The practical example is: I need to sum the total amount of time worked on a week for specific roles (engineer, etc..) within the company. What I need is to sum a column of values only if the name on the left has a specific role. I could put that role on a column next to the name, but as I would like to keep a history of employee promotion, the role is on a similar week basis table.

Following, we can see the workload tab (with the name and column to sum for example, sum column E) and the people with the name and the roles A21:AB37.

So I am trying to, for example, place the sum of hours(workload) from 'estag 1' people (name matches 'people' tab) on the 'data' tab, on C40

Following is a copy of the Sheets, feel free to update: https://docs.google.com/spreadsheets/d/1GgQGM7Pca0P3kdZurIBwQP9EMTILswc3sIWF11xXMMM/edit?usp=sharing

I've tried a sumif with filter inside, query, vlookup, but I couldn't get to a working function.

Any suggestions??


回答1:


try:

=COUNTA(IFERROR(FILTER(people!$A$24:$A, people!C$24:C=$B40)))

and drag down and to the right as needed


UPDATE

=ARRAYFORMULA(SUM(IFERROR(VLOOKUP(IFERROR(
 FILTER(people!$A$24:$A, people!C$24:C=$B40), "♥"), 
 {people!$A$2:$A, people!C$2:C}, 2, 0))))



来源:https://stackoverflow.com/questions/59184293/is-there-a-way-to-sumifs-based-on-a-condition-for-a-output-range

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!