简体   繁体   English

如何使用范围从excel中的多个工作表中添加数字

[英]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.

相关问题 合并多个工作表中的打印范围VBA EXCEL - Combine Print Ranges from Multiple Worksheets VBA EXCEL VBA SUMIFS 使用来自多个工作表的最后一行和日期范围 - VBA SUMIFS using last row and date ranges from multiple worksheets 从多个工作表中获取多个范围的平均值 - Get Average of Multiple Ranges from Multiple Worksheets 将多个 Excel 工作表范围作为图片转换为新的 Excel 工作簿作为工作表 - Convert Multiple Excel Sheet Ranges as Picture to New Excel Workbook as worksheets Excel中的IF语句使用多个工作表 - IF Statement in Excel using multiple worksheets Excel Pivot Table宏可用于具有动态范围的多个工作表 - Excel Pivot Table macro to use on multiple worksheets with dynamic ranges 使用 Excel 作为数据库从多个工作表中提取数据 - Pull data from multiple worksheets using Excel as database 如何使用PowerShell在服务器上没有Excel的情况下从多个.csvs(作为工作表)创建.xlsx? - How to create an .xlsx from multiple .csvs (as worksheets) without Excel on a Server using PowerShell? 如何使用C#将大型Excel工作表中的数据读取到列表中 - How to read data from large multiple excel worksheets in to a list using C# 如何遍历多个Excel工作表并使用python排序数据? - How to loop through multiple excel worksheets and sort data using python?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM