[英]how to add figures from multiple worksheets in excel using ranges
I have multiple worksheets all using the same template I have a summary page and have a formula that works for an individual sheet 我有多个工作表都使用同一模板,我有一个摘要页面,并且有一个适用于单个工作表的公式
=SUMPRODUCT(--(sheet1!F4:sheet1!F500>=A1),--(sheet1!F4:sheet1!F500 = SUMPRODUCT(-(sheet1!F4:sheet1!F500> = A1),-(sheet1!F4:sheet1!F500
the formula checks the relevant ranges on sheet 1 and returns the values in the boxes in the date range specified in A1 and A2 该公式检查工作表1上的相关范围,并在A1和A2中指定的日期范围内返回框中的值
The problem is that I want to do this for multiple sheets and use a 3D reference. 问题是我想对多张纸进行此操作并使用3D参考。
I have tried 我努力了
=SUMPRODUCT(--(sheet1:sheet3!F4:sheet1:sheet3!F500>=A1),--(sheet1:sheet3!F4:sheet1:sheet3!F500 = SUMPRODUCT(-(sheet1:sheet3!F4:sheet1:sheet3!F500> = A1),-(sheet1:sheet3!F4:sheet1:sheet3!F500
and also thrown in some extra brackets to be safe 并放在一些额外的括号中以确保安全
=SUMPRODUCT(--((sheet1:sheet3!F4):(sheet1:sheet3!F500>=A1)),--((sheet1:sheet3!F4):(sheet1:sheet3!F500) = SUMPRODUCT(-(((sheet1:sheet3!F4):( sheet1:sheet3!F500> = A1)),-(((sheet1:sheet3!F4):( sheet1:sheet3!F500)
neither of these work and I am getting the #NAME? 这些都不起作用,我得到了#NAME吗? error
错误
any ideas would be appreciated 任何想法,将不胜感激
Thanx in advance 提前感谢
Gary 加里
Your formulas look like they are truncated, are you just trying to count dates between A1 and A2 inclusive? 您的公式看起来像被截断了,您是否只是想计算A1和A2之间的日期? You can't use 3D references in SUMPRODUCT.
您不能在SUMPRODUCT中使用3D参考。 In Excel 2007 you could use this formula
在Excel 2007中,您可以使用此公式
=SUMPRODUCT(COUNTIFS(INDIRECT("'"&G1:G3&"'!F4:F500"),">="&A1,INDIRECT("'"&G1:G3&"'!F4:F500"),"<="&A2))
where you have all your sheet names listed in G1:G3 您在G1:G3中列出的所有工作表名称的位置
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.