跳到主要內容

如何在Excel中基於單個條件求和多列?

在Excel中,您可能始終需要根據一個條件對多列求和。 例如,我有一系列數據,如下面的屏幕快照所示,現在,我想獲取三個月(一月,二月和三月)的KTE總值。

使用幫助者列基於多個條件求和多個列

使用數組公式基於單個條件求和多列

具有出色功能的基於單個條件的多列求和


使用幫助者列基於多個條件求和多個列

在Excel中,我們可以創建一個輔助列以對每一行的總和求和,然後使用sumif函數根據條件對這一列求和,請執行以下操作:

1。 在此示例中,您可以首先對每一行的總計值求和,請鍵入以下公式: =總和(B2:D2),然後將填充手柄向下拖動到要應用此公式的單元格,將顯示每行的總值,請參見屏幕截圖:

2. 接下來,您可以根據以下條件應用以下sumif函數對助手列E中的數據求和:

=SUMIF(A2:A10, G2, E2:E10)

然後,按 Enter 鍵,您將根據特定條件獲得總數。 看截圖:

保養竅門:在上式中:

  • A2:A10 指您要對其應用條件的單元格範圍;
  • G2 是要添加項目的標準;
  • E2:E10 指定要添加的單元格。

查找並彙總行或列中的所有匹配值

Excel的Kutools's 查找和總和 功能可幫助您查找特定值並根據需要獲取行或列中所有匹配值的總和。 點擊下載Kutools for Excel!

Excel的Kutools:擁有 300 多個方便的 Excel 插件,30 天內免費試用,無限制。 立即下載並免費試用!


使用數組公式基於單個條件求和多列

如果您不喜歡使用helper列來解決此問題,那麼這裡的數組公式也可以對您有所幫助。

1。 在您的特定單元格-G2中輸入或複制以下公式:

=SUM((B2:B10+C2:C10+D2:D10)*(--(A2:A10=F2)))

2。 然後按 Ctrl + Shift + Enter 鍵,您將獲得正確的結果。

保養竅門:在上式中:

  • B2:B10, C2:C10D2:D10,指明您要求和的列,如果您需要匯總更多的列數據,則只需添加列範圍即可;
  • A2:A10 指您要對其應用條件的單元格範圍;
  • F2 是要添加項目的標準。

具有出色功能的基於單個條件的多列求和

為了盡快處理此任務,Kutools for Excel的LOOKUP和Sum功能也可以為您提供幫助。

提示:要應用此 從下到上查找 功能,首先,您應該下載 Excel的Kutools,然後快速輕鬆地應用該功能。

安裝後 Excel的Kutools,請這樣做:

1。 點擊 庫工具 > 超級查找 > 查找和總和,請參見屏幕截圖:

2。 在 查找和總和 對話框,請執行以下操作:

  • 選擇 在行中查找和總和匹配值 選項下 查找和總和類型 部分;
  • 指定查詢值,輸出範圍和要使用的數據范圍;
  • 選擇 返回所有匹配值的總和 選項從 選項.

3。 然後,點擊 OK 按鈕,並立即計算所有匹配記錄的總值,請參見屏幕截圖:

立即下載並免費試用Excel的Kutools!


更多相關文章:

  • 一列中包含多個條件的求和
  • 在Excel中,SUMIF函數是有用的函數,可用於匯總不同列中具有多個條件的單元格,但是使用此功能,我們還可以基於一列中的多個條件對單元格求和。 在這篇文章中。 我將討論如何在同一列中使用多個條件對值求和。
  • 在Excel中具有一個或多個條件的Sumif
  • 在Excel中,基於一個或多個條件的求和值是我們大多數人的常見任務,SUMIF函數可以幫助我們根據一個條件快速求和,而SUMIFS函數可以幫助我們對多個條件求和。 本文,我將描述如何在Excel中對一個或多個條件求和?
  • Google表格中兩個給定日期之間的Sumif單元格值
  • 在我的Google表格中,我有兩列,分別包含日期列和訂單列,現在,我想基於日期列對訂單列單元格求和。 例如,如下圖所示,求和值在2018/5/15和2018/5/22之間。 您如何在Google表格中解決此工作?
  • 值在另一列中更改時對單元格求和
  • 有時,當您處理Excel工作表時,可能需要根據另一列中的數據組對單元格求和。 例如,在這裡,我想對A列中的數據更改時B列中的訂單求和以獲得以下結果。 您如何在Excel中解決此問題?
  • 跨多個工作表的Vlookup並在Excel中求和結果
  • 假設,我有四個具有相同格式的工作表,現在,我想在每個工作表的“產品”列中找到電視機,並獲取這些工作表的總訂單數,如下面的屏幕截圖所示。 如何在Excel中使用簡單快速的方法解決此問題?

最佳辦公生產力工具

🤖 Kutools 人工智慧助手:基於以下內容徹底改變數據分析: 智慧執行   |  生成代碼  |  建立自訂公式  |  分析數據並產生圖表  |  呼叫 Kutools 函數...
熱門特色: 尋找、突出顯示或識別重複項   |  刪除空白行   |  合併列或儲存格而不遺失數據   |   沒有公式的回合 ...
超級查詢: 多條件VLookup    多值VLookup  |   跨多個工作表的 VLookup   |   模糊查詢 ....
高級下拉列表: 快速建立下拉列表   |  依賴下拉列表   |  多選下拉列表 ....
欄目經理: 新增特定數量的列  |  移動列  |  切換隱藏列的可見性狀態  |  比較範圍和列 ...
特色功能: 網格焦點   |  設計圖   |   大方程式酒吧    工作簿和工作表管理器   |  資源庫 (自動文字)   |  日期選擇器   |  合併工作表   |  加密/解密單元格    按清單發送電子郵件   |  超級濾鏡   |   特殊過濾器 (過濾粗體/斜體/刪除線...)...
前 15 個工具集12 文本 工具 (添加文本, 刪除字符,...)   |   50+ 圖表 類型 (甘特圖,...)   |   40+ 實用 公式 (根據生日計算年齡,...)   |   19 插入 工具 (插入二維碼, 從路徑插入圖片,...)   |   12 轉化 工具 (數字到單詞, 貨幣兌換,...)   |   7 合併與拆分 工具 (高級合併行, 分裂細胞,...)   |   ... 和更多

使用 Kutools for Excel 增強您的 Excel 技能,體驗前所未有的效率。 Kutools for Excel 提供了 300 多種進階功能來提高生產力並節省時間。  點擊此處獲取您最需要的功能...

產品描述


Office選項卡為Office帶來了選項卡式界面,使您的工作更加輕鬆

  • 在Word,Excel,PowerPoint中啟用選項卡式編輯和閱讀,發布者,Access,Visio和Project。
  • 在同一窗口的新選項卡中而不是在新窗口中打開並創建多個文檔。
  • 將您的工作效率提高 50%,每天為您減少數百次鼠標點擊!
Comments (11)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
i need 1+1+1+1 in one column total in auto
This comment was minimized by the moderator on the site
This worked for me however I don't understand what the (-- is for?
This comment was minimized by the moderator on the site
Gracias por su publicacion! Me ayudo mucho!!!
esra tan
simple! jeje Gracias!
This comment was minimized by the moderator on the site
Hi

I have used the formula outlined in "Sum multiple columns based on single criteria with an array formula" - I am working with tables and address the columns with the table column names - the formula works however only if the criteria is YES for the first row in the table - if the criteria is not matched the total Sum is equal to Zero - it seems to disregard the other rows and does no sum them up. - any idea?

I had to now add SUMIFS about 12 times which looks awful.. thanks a lot

Nicole
This comment was minimized by the moderator on the site
Sum all column values that has a specific value in the first column

Cell A1: a
Cell B1: {=SUM(--(A1=A3:A9)*B3:F9)} resulting in the sum 104 (has to be entered by using CTRL+SHIFT+ENTER)

a 104

a 2 5 7 2 2
b 5 1 6 9 4
c 7 6 1 1 9
a 4 5 8 6 2
b 4 8 3 2 6
a 6 9 4 8 5
a 6 8 9 5 1
This comment was minimized by the moderator on the site
How can I sum multiple columns from single criteria/range?Can anyone advise using the below formula


=sumif(T12:T69,>0,(sum(G13:G69)*sum(T12:T69)))
This comment was minimized by the moderator on the site
Can you help me get rid of the Div/0 in this formula. #DIV/0. =IF((F9+G9)>E65,E65/(F9+G9)*2,E65/(F9+G9+H9)*3)
This comment was minimized by the moderator on the site
Hi Erika. Simply add the following: =iferror(your formula above, 0)
This comment was minimized by the moderator on the site
How can I sum multiple columns from single criteria/range? This formula doesn't work but will hopefully explain what I want. =SUMIF(C3:C36,C40,D3:W36) The result of this formula only SUMs D3:D36 and not the extra colums, i.e. E3:E36
This comment was minimized by the moderator on the site
How do you sum with multiple criteria in single column and sum range in multiple columns
This comment was minimized by the moderator on the site
Try the formula Sumifs
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations