English 中文(简体)
查找 SUM 除了一些列外
原标题:Finding SUM except some columns

下面就是我拥有的。

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+  A  +  B  +  C  +  D  +  E  +  F  +  G  +  H  +  I  +  J  +  K  +
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+  1  +  2  +  3  +  4  +  5  +  6  +  7  +  8  +  9  +  10 +  50 +
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

要找到此行的 < 坚固> SUM , 不包括 < code> Cell E 我使用以下公式 。

<%code{%SUM( A1: D1) +SUM( F1: J1)

NOTE: Cell K 拥有SUM。

还有别的办法吗?

以上只是一个例子,然而在我的工作表中,有大约100个栏目,我需要排除大约10-15个栏目。

最佳回答

如果您在此添加一行 :

Row2: yes yes yes yes no yes yes yes yes yes no ...

(原A:K栏)

那么答案可能是

=SUMIF(2:2,"yes",1:1)
问题回答

我相信

=SUM(A1:J1)-E1

更明确地表达你的意图。 (如果排除的栏目含有数字,当然)

我确实认为这是另一种方式

=SUM(A1:D1;F1:J1)

Excel 中解决这一问题的共同办法是将 SUM 函数应用到整个范围,并将例外列表从中减去,同时使用 SUM 函数,这一次将单个单元格的离散列表加起来:

=SUM(<range to sum>)-SUM(<exception cell 1>, <exception cell 2>, ...)

此选项适用于您目前 ~ 100 单元格的示例, 加上5 个例外 :

=SUM(A1:CV1)-SUM(E1,M1,Y1,AB1,BU1)

如果您想让Excel电子表格更灵活地适应这些列排除,您可以考虑在您列的离散选择中定义一个指定区域。如果在子字符串 SUM 公式中使用它,当需要排除额外的列时,您将避免更改公式:您只需要更改指定的区域规格。

=SUM(A1:J1)-SUM(A1:J1 Exclusion_List)

此处 Exclexion_List 是一个在不同的列上命名的区域, 以排除





相关问题
import of excel in SQL imports NULL lines

I have a stored procedure that imports differently formatted workbooks into a database table, does work on them then drops the table. Here is the populating query. SELECT IDENTITY(INT,1,1) AS ID ...

Connecting to Oracle 10g with ODBC from Excel VBA

The following code works. the connection opens fine but recordset.recordCount always returns -1 when there is data in the table. ANd If I try to call any methods/properties on recordset it crashes ...

Excel date to Unix timestamp

Does anyone know how to convert an Excel date to a correct Unix timestamp?

C# GemBox Excel Import Error

I am trying to import an excel file into a data table using GemBox and I keep getting this error: Invalid data value when extracting to DataTable at SourceRowIndex: 1, and SourceColumnIndex: 1. As ...

Importing from excel "applications" using SSIS

I am looking for any tips or resources on importing from excel into a SQL database, but specifically when the information is NOT in column and row format. I am currently doing some pre-development ...

热门标签