Excel 如果其他单元格中满足多个条件,则求和
我有一个Excel电子表格,数据如下所示:Excel 如果其他单元格中满足多个条件,则求和,excel,count,sum,Excel,Count,Sum,我有一个Excel电子表格,数据如下所示: Column A Column B Column C Column D Row 1 Sector Rail Row 2 A B C Row 3 Type 1 1 5 1 Row 4 Type 2
Column A Column B Column C Column D
Row 1 Sector Rail
Row 2 A B C
Row 3 Type 1 1 5 1
Row 4 Type 2 2 3 0
Row 5 Type 3 1 1 6
Row 6 Total 4 9 7
在第1行中,您可以看到A列中我有扇区,B列中我有扇区类型,即Rail
。我的电子表格有几个不同的数据出现在以下结构中,如下所示:
Column A Column B Column C Column D
Row 1 Sector Rail
Row 2 A B C
Row 3 Type 1 1 5 1
Row 4 Type 2 2 3 0
Row 5 Type 3 1 1 6
Row 6 Total 4 9 7
Row 7
Row 8 Sector aerospace
Row 9 A B C
Row 10 Type 1 0 9 9
Row 11 Type 2 3 3 1
Row 12 Type 3 4 5 6
Row 13 Total 0 1 8
Row 14
Row 15 Sector Rail
Row 16 A B C
Row 17 Type 1 8 9 9
Row 18 Type 2 3 3 1
Row 19 Type 3 4 5 6
Row 20 Total 9 1 8
注意,扇区<代码>轨道< /代码>有两组数据,其中一个在<>代码>宇航< /代码>中间。
现在我需要一个公式,将B列第6行的总数相加,并将B列第20行的总数相加。但仅适用于导轨
因此,B列第1行具有扇区轨道,但B列第14行也具有扇区。
因此,我需要一个公式,它将找到单词Rail
的两个匹配项,然后给我第6行+第20行的总数,即1+8=9的总数
有人能告诉我这是否可行吗?请尝试删除第2行并:
=SUMIF(B1:B98,"Rail",B2:B99)
我不能删除行2,我需要空白行: