excel - How can I use 3D SUMIF function over a single worksheet?
问题描述
I have a XL Doc with 2 worksheets. In one worksheet (Scope) I have all the resources listed down with their allocation and capacity. In the second worksheet (Summary)I will be including tickets to the resources that I mentioned in my first worksheet and the hours for each ticket will also be inserted.
1st Worksheet Name - Summary
2nd Worksheet Name - Scope
There are 3 columns in Scope
sheet namely, Resource
, Ticket
and Hours
.
In Summary
Sheet I have Resource
and Allocation
columns.
I need to get the total hours for a resource in Summary
sheet and display it on Allocation
column.
Note: A resource will have multiple tickets allocated.
I tried below formula in Summary
sheet. But it shows value 0, even I inserted hours in Scope
sheet.
=SUMPRODUCT(SUMIF(INDIRECT("'"&Scope&"'!"&"A2:A500"),C4,INDIRECT("'"&Scope&"'!"&"I2:P500")))
C4 cell contains the name of the resource.
Please help me to sort this.
解决方案
Try this,
=SUMPRODUCT(SUMIF(Scope!A2:A500, C4, INDIRECT(ADDRESS(2, COLUMN(I:P), 4, 1, "Scope")&":"&ADDRESS(500, COLUMN(I:P), 4, 1))))
推荐阅读
- python - 如何在保留现有数据的同时修补用户模型?
- python - 从具有 NA 值的日期获取年份和月份作为字符串
- java - GET 请求的参数被放入 URL 的查询字符串中。在 POST 请求中,它们位于请求正文中,那么 URL 是什么样的?
- ios - 在 UICollectionView 中加载第一个单元格之前获取 UICollectionViewCell
- java - 西蒙说按下按钮后按钮颜色不会恢复正常
- javascript - jQuery UI datepicker 和对话框未定义的第一次点击
- nginx - Nginx 上的 Modsecurity modsecurity.conf-recommended Source Not Found
- mysql - phpmyadmin mysql docker 简单链接
- ecmascript-6 - es6 导入:命名导入的变量
- javascript - 将路径数组转换为唯一路径数组