简体   繁体   English

基于列值的 Excel 公式

[英]Excel Formula Based on Column Value

I have a spreadsheet that has about 1,200 job items.我有一个包含大约 1,200 个工作项目的电子表格。 Each job item is assigned to a Task number (its own column, ie, Task 1, Task 2, Task 3, etc).每个作业项目都分配到一个任务编号(它自己的列,即任务 1、任务 2、任务 3 等)。 Each job item includes columns for $ committed, $ obligated, and $ expense.每个作业项目包括 $ 承诺、$ 义务和 $ 费用的列。 I need a formula that will give me a total for each Task number based on the 3 $ columns for all 1,200 rows.我需要一个公式,它可以根据所有 1,200 行的 3 $ 列为每个任务编号提供总数。 Thank you in advance.先感谢您。

I am not sure if I understand your question, but I think the sum formula would work.我不确定我是否理解您的问题,但我认为总和公式会起作用。

Depending on the column arrangement, use a formula like this:根据列的排列,使用如下公式:

=SUM(E5:H5) =总和(E5:H5)

You have options, for example extract a list of unique tasks (say with Advanced Filter, Copy to another location, say G2 etc) and a formula such as:您可以选择,例如提取独特任务列表(例如使用高级过滤器、复制到另一个位置、例如 G2 等)和一个公式,例如:

=SUMIF(B:B,G2,C:C)+SUMIF(B:B,G2,D:D)+SUMIF(B:B,G2,E:E)

copied down to suit.复制下来以适应。

Or with a PivotTable and a Calculated Field.或者使用数据透视表和计算字段。 Task column in ROWS, Sum of each of the $ columns in VALUES and a field added of: ROWS 中的Task列、VALUES 中每个$列的总和以及添加的字段:

='$Committed' +'$ expense' +'$obligated' 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM