You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何用Excel公式按Week计算不同Ano的Points去重求和?

Excel Formula to Sum Unique Ano's Points Grouped by Week

Got it, let's tackle this Excel problem where you need to sum the unique Points values for each distinct Ano, grouped by Week. First, let's recap your sample data and desired outcome for clarity:

Sample Data

WeekTIDAnoPoints
1111ANo11
1112ANo11
2221ANo20.25
2222ANo20.25
2223ANo20.25
2331ANo31
2332ANo31
2333ANo31
2999Ano90.25
2998Ano90.25
3421ANo40.25
3422ANo40.25
3423ANo40.25
3531ANo50.5
3532ANo50.5
3533ANo50.5

Desired Result

WeekPoints_Sum
11
21.50
30.75

Solutions Based on Excel Version

1. For Excel 365 / Excel 2021 (Dynamic Array Support)

This is the most efficient approach if your Excel supports dynamic arrays. Assume your raw data is in range A2:D16 (headers in row 1):

  • Step 1: Get Unique Weeks
    In cell F2, enter this formula to automatically generate all unique Week values (it will spill down automatically):

    =UNIQUE(A2:A16)
    
  • Step 2: Sum Unique Points per Week
    In cell G2, use this formula to calculate the sum for each Week (it will also spill down to match the unique Weeks):

    =BYROW(UNIQUE(A2:A16), LAMBDA(wk, SUM(UNIQUE(FILTER(D2:D16, A2:A16=wk, "")))))
    

How this works:

  • UNIQUE(A2:A16) pulls all distinct Week values.
  • BYROW loops through each unique Week, applying the lambda function to calculate the sum.
  • FILTER(D2:D16, A2:A16=wk) grabs all Points values for the current Week.
  • UNIQUE(...) removes duplicate Points values for the same Ano, then SUM adds them up.

2. For Older Excel Versions (No Dynamic Arrays)

If you're using an older Excel version (pre-2021), use this traditional array formula. First, manually list the unique Weeks in cells F2:F4:

In cell G2, enter this formula and press Ctrl+Shift+Enter (not just Enter) to confirm it as an array formula, then drag it down to G4:

=SUM(IF(FREQUENCY(IF(A$2:A$16=F2, MATCH(D$2:D$16, D$2:D$16, 0)), ROW(D$2:D$16)-ROW(D$2)+1), D$2:D$16))

How this works:

  • IF(A$2:A$16=F2, MATCH(D$2:D$16, D$2:D$16, 0)) filters rows for the current Week, then gets the first occurrence position of each Points value.
  • FREQUENCY(...) counts how many times each position appears—only first occurrences have a count of 1.
  • IF(...) retains only the first occurrence of each Points value, then SUM adds them up.

内容的提问来源于stack exchange,提问作者Sathish

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.15 04:04:54