跳到主要內容

如何基於Excel中下拉列表的選擇求和值?

假設您有一個包含兩列(類別和金額)的表,並且創建了一個包含所有類別的數據驗證下拉列表。 從下拉列表中選擇類別時,您要匯總“金額”列中的所有相應值。 如下面的屏幕截圖所示,如果從下拉列表中選擇AA,則結果將為10 + 30 + 80 = 120。 如何實現呢? 本文中的方法可以幫您一個忙。

基於使用公式選擇下拉列表的總和
借助出色的工具,根據對下拉列表的選擇輕鬆地對值求和

下拉列表的更多教程...


基於使用公式選擇下拉列表的總和

您可以基於Excel中的下拉列表選擇,將以下公式應用於求和值。

1.選擇一個空白單元格以輸出結果,

2.在其中輸入以下公式,然後按 Enter 鍵。

=SUMIF(A2:A10,D2,B2:B10)

從現在開始,將根據下拉列表的選擇自動調整總和。

筆記:

  • 1.您還可以根據選擇下拉列表,將以下公式應用於求和值。
    =SUMPRODUCT(SUMIF($A$2:$A$10,$D$2,$B$2:$B$10))
  • 2.在公式中,A2:A10是類別範圍,D2是下拉列表單元格,而B2:B10是您需要根據下拉列表選擇求和的值範圍。 請根據需要更改它們。

借助出色的工具,根據對下拉列表的選擇輕鬆地對值求和

在這裡推荐一個方便的工具– 查找和總和 的效用 Excel的Kutools 幫助您輕鬆地基於下拉列表選擇求和,而無需應用公式。 請執行以下操作。

申請前 Excel的Kutools首先下載並安裝.

1。 點擊 庫工具 > 超級查找 > 抬頭 。 參見screeshot:

2.然後 查找和總和 對話框彈出,您需要完成以下設置:

  • 2.1)在 查找和總和類型 部分,選擇 在行中查找和求和匹配值 選項;
  • 2.2)在 選擇範圍 部分,指定 查找值,輸出範圍 以及 數據表 範圍;
  • 2.3)在 選項 部分,選擇 返回所有匹配值的總和 選項;
  • 2.4)點擊 確定。

然後在“輸出”單元格中自動創建一個公式。 從現在開始,總和將根據下拉項自動調整。

  如果您想免費試用(30天)此實用程序, 請點擊下載,然後按照上述步驟進行操作。


相關文章:

在Excel下拉列表中鍵入時自動完成
如果您有一個包含大值的數據驗證下拉列表,則需要在列表中向下滾動以查找合適的列表,或直接在列錶框中鍵入整個單詞。 如果在下拉列表中鍵入第一個字母時有允許自動完成的方法,一切將變得更加容易。 本教程提供了解決問題的方法。

在Excel中從另一個工作簿創建下拉列表
在工作簿中的工作表之間創建數據驗證下拉列表非常容易。 但是,如果數據驗證所需的列表數據位於另一個工作簿中,您將怎麼辦? 在本教程中,您將詳細了解如何從Excel中的另一個工作簿創建拖放列表。

在Excel中創建可搜索的下拉列表
對於具有眾多價值的下拉列表,找到合適的價值並非易事。 以前,我們已經介紹了一種在下拉框中輸入第一個字母時自動完成下拉列表的方法。 除了自動完成功能之外,您還可以使下拉列表可搜索,以提高在下拉列表中查找適當值時的工作效率。 為了使下拉列表可搜索,請嘗試本教程中的方法。

在Excel下拉列表中選擇值時自動填充其他單元格
假設您已經根據單元格區域B8:B14中的值創建了一個下拉列表。 在下拉列表中選擇任何值時,都希望在選定單元格中自動填充單元格範圍C8:C14中的相應值。 為了解決該問題,本教程中的方法將對您有所幫助。

下拉列表的更多教程...

最佳辦公生產力工具

🤖 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 (15)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hi.

I have a document which has a selection of food items that people have to choose. I want to try and calculate how many people have chosen a specific starter, from a drop list I created. Is this possible to do?
This comment was minimized by the moderator on the site
Hello, first off, this is a great tutorial, thank you for this post!

I am wondering if you know how to adjust the formula to draw values from another sheet.
(I have looked at the link Crystal shared with Aaron but I can't figure it out with that additional info).

I am trying to automate a monthly budget based on a company's transactions.

Thanks!
This comment was minimized by the moderator on the site
Hi Bella,

To sum the values from another worksheet, the formula is the same, the only difference is that you need to reference to different cell ranges in a different worksheet in the formula. As you mentioned, the formula here needs to be changed to:
=SUMIF(transactions!A2:A10,'Monthly budget'!A2,transactions!B2:B10)
If I mistanderstood your question, please let me know. For clarity, please attach ascreenshot with your data and desired results.
This comment was minimized by the moderator on the site
Hi there, i am currently facing a similar issue, did u find a solution to this?
This comment was minimized by the moderator on the site
Is there a formula to total on Sheet 1 from drop down box amounts on multiple sheets?
This comment was minimized by the moderator on the site
Hi Aaron,
The methods in the following articel may do you a favor. Please have a try.
How To Vlookup Across Multiple Sheets And Sum Results In Excel?
This comment was minimized by the moderator on the site
cant seem to find out how to command a cell from the drop down menu. E.G i have a simple yes or no drop down for a column and i want the cell if YES to increase the cost
by 10% and if no to keep the price the same
This comment was minimized by the moderator on the site
Hi NADIA,
You may need to attach a screenshot or a sample file to describe the problem you encountered more clearly.
This comment was minimized by the moderator on the site
The Sum Values Based On Selection Of Drop-Down List With Formula worked perfectly for what I needed. Thanks so much for posting this on here. You saved me hours of headaches!
This comment was minimized by the moderator on the site
I am trying to use sumifs with set of conditions. There is a project column with sprint numbers and test cases, etc.. I created a drop down list of the project names above the cell with the formula and referred that in the Sumif condition. Now based on my dropdown selection, the total of test cases created are resulted. This works absolutely fine. Now, if I have to select the dropdown to select all projects, how do I do it. I tried creating a list item as "<>" but that is not working. Any suggestions?
This comment was minimized by the moderator on the site
Trying using the wild card "*" so the last or first item in your list is just the *. I am working through a similar problem and that has worked most of the time.
This comment was minimized by the moderator on the site
Did you find a way to make this work?
This comment was minimized by the moderator on the site
Hi,
What do you mean of "to select the dropdown to select all projects"?
Would be nice if you could provide screenshot of what you are trying to do.
Thanks for your comment.
This comment was minimized by the moderator on the site
formula for 2 different categories
This comment was minimized by the moderator on the site
how to sum value all selected cell in sum total value ?
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations