Vlookup、Google 文档、过滤器和和

发布于 2024-08-16 16:31:09 字数 433 浏览 7 评论 0原文

我有一行包含成本、项目类型和“标签”列。我希望能够找到包含某个“标签”的所有行的总成本。我尝试使用 VLOOKUP 但仍然收到 0.00 美元的回报。

Example Row Setup:
    PART NUMBER - COST - TAGS - MANU ID - WEIGHT
    0001025-SVR - 25.99 - JP, CABLES, PVC - 17.4
    0A06422-SVR - 14.27 - SOLENOID, COPPER - 4.6
    ZZZ4244-XUM - 25047.22 - PLAT, JP, HEADER, RACTIVE - 2488.25

寻找 JP 标签。应返回:25073.21,这是第一行和最后一行的总和。 我尝试过 VLOOKUP("JP",A2:D4,2) 以及过滤功能,但似乎仍然无法使其正常工作。

I have a row with a cost, item type and a "tags" columns. I want to be able to find the total cost of all rows containing a certain "tag". I tried using VLOOKUP but I keep on getting a $0.00 return.

Example Row Setup:
    PART NUMBER - COST - TAGS - MANU ID - WEIGHT
    0001025-SVR - 25.99 - JP, CABLES, PVC - 17.4
    0A06422-SVR - 14.27 - SOLENOID, COPPER - 4.6
    ZZZ4244-XUM - 25047.22 - PLAT, JP, HEADER, RACTIVE - 2488.25

Looking for JP Tag. Should return: 25073.21, which is the total of the first and last row.
VLOOKUP("JP",A2:D4,2) is what I have tried, along with the filter function but still cannot seem to get it to work correctly.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

超可爱的懒熊 2024-08-23 16:31:09

编辑:我的第一个解决方案适用于 Excel,但不适用于 Google Docs。

请尝试以下操作(已测试):

=SUM(IFERROR(FILTER( B7:B200 ; SEARCH( "JP" ; E7:E200 ));0))

您需要 SumIf 函数。

假设您的成本位于 B 列,并且您的标签位于 C 列,则这应该有效:

=SumIf(C2:C4, "*" & "JP" & "*", B2:B4)

* 是通配符,可匹配“JP”左侧和右侧的任何内容。

Edit: My first solution will work in Excel, but not Google Docs.

Try this instead (tested):

=SUM(IFERROR(FILTER( B7:B200 ; SEARCH( "JP" ; E7:E200 ));0))

You'll want the SumIf function.

Assuming your costs are in column B, and your tags in column C this should work:

=SumIf(C2:C4, "*" & "JP" & "*", B2:B4)

The * are wildcards that will match anything to the left and right of "JP".

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文