[英]Excel, SUMIFS criteria range is also sum range
我試圖在另一本工作簿的I
列中找到大於H
列中日期范圍之間的£179 [在B13
單元格中引用的]值的總和[2014/01/2014-2014/06/30分別在單元格B1
和C1
]。 我不想編輯包含H
和I
列的工作簿。
這是我擁有的公式,但是會出錯,因為我假設您不能同時擁有總和范圍和一個標准范圍: =SUMIFS([anotherFilel.xlsx]sheet!$I$16:$I$99999, [anotherFilel.xlsx]sheet!$I$16:$I:$99999,>$B$13,[anotherFilel.xlsx]sheet!$H$16:$H$99999,<=$C2,[anotherFilel.xlsx]sheet!$H$16:$H$99999,>=$B2)
和anotherFile.xlsx表:(包含空白行)
H I
30/05/14 £1,072.00
16/04/14 £179.00
25/04/14 £249.00
28/04/14 £169.50
£358.00
30/04/14 £179.00
02/05/14 £1,146.00
01/05/14 £179.00
30/04/14 £796.00
01/05/14 £150.00
06/05/14 £179.00
08/05/14 £278.00
08/05/14 £1,440.00
19/05/14 £249.00
20/05/14 £179.00
02/06/14 £127.00
02/06/14 £269.00
05/06/14 £297.83
04/06/14 £23.50
12/06/14 £214.80
04/06/14 £318.00
25/06/14 £144.00
18/06/14 £538.00
12/06/14 £155.75
09/06/14 £298.00
17/06/14 £597.60
13/06/14 £302.00
17/06/14 £264.00
17/06/14 £49.50
17/06/14 £23.50
23/06/14 £134.00
@Fabricator的答案應該起作用,但是如果您只想用SUMIFS
編寫它,則需要引用條件並用&
串聯值。 Excel的條件欄和求和欄都沒有問題。
=SUMIFS([anotherFilel.xlsx]sheet!$I$16:$I$99999,
[anotherFilel.xlsx]sheet!$I$16:$I$99999, ">" & $B$13,
[anotherFilel.xlsx]sheet!$H$16:$H$99999, "<=" & $C2,
[anotherFilel.xlsx]sheet!$H$16:$H$99999, ">=" & $B2)
您可以使用數組公式
{=SUM(IF((B1<=[anotherFilel.xlsx]sheet!H:H)
*([anotherFilel.xlsx]sheet!H:H<=C1)
*([anotherFilel.xlsx]sheet!I:I>B13),
[anotherFilel.xlsx]sheet!I:I,0))}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.