跳到主要内容

如何根据Excel中下拉列表的选择求和值?

假设您有一个包含两列(类别和金额)的表,并且创建了一个包含所有类别的数据验证下拉列表。 从下拉列表中选择类别时,您要汇总“金额”列中的所有相应值。 如下面的屏幕截图所示,如果从下拉列表中选择AA,则结果将为10 + 30 + 80 = 120。 如何实现呢? 本文中的方法可以帮您一个忙。

基于使用公式选择下拉列表的总和
借助出色的工具轻松地基于下拉列表的选择来求和

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


基于使用公式选择下拉列表的总和

您可以基于Excel中的下拉列表选择,将以下公式应用于求和值。

1.选择一个空白单元格以输出结果,

2.在其中输入以下公式,然后按 输入 键。

=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是您需要根据下拉列表选择求和的值范围。 请根据需要更改它们。

借助出色的工具轻松地基于下拉列表的选择来求和

在这里推荐一个方便的工具– 查找和总和 实用程序 Kutools for Excel 帮助您轻松地基于下拉列表选择求和,而无需应用公式。 请执行以下操作。

申请前 Kutools for Excel首先下载并安装.

1。 点击 库工具 > 超级查找 > LOOKUP 。 见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 Tab 为 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