Excel上の同じデータのものの数量を合計し、重複は削除したい

Excel内の検索キーまたは型式が同じものの数量を合計して、合計した列以外の重複したデータは削除をしたいです。
例として下記のようなデータになればいいなと思っています。

検索キー 型式 数量
AAA aaa 10
AAA aaa 5
AAA aaa 4
BBB bbb 3
BBB bbb 8
CCC ccc 4
DDD ddd 6
DDD ddd 5
DDD ddd 5
DDD ddd 6
EEE eee 8
EEE eee 7
EEE eee 7
検索キー 型式 数量
AAA aaa 19
BBB bbb 11
CCC ccc 4
DDD ddd 22
EEE eee 22

Book1.xlsx (9.0 KB)

こんにちは

グルーピングによる集約なので以下が参考になると思います。

@takahashi_n

Follow below steps,

1.Take read range workbook activity to read the data from your input file, store output as dtInput
2.Use build data table activity and create your three columns with your column names


and create output variable for this activity as dtOutput
3. take assign activity pass that output variable of above activity in To section and in value section pass below expression
(From row In dtInput.AsEnumerable()
Group row By key1 = row(“Search Key”).ToString.Trim,
key2 = row(“Model”).ToString.Trim
Into grp = Group
Let total = grp.Sum(Function(r) Convert.ToInt32(r(“Quantity”)))
Select dtOutput.Rows.Add(key1, key2, total)
).CopyToDataTable()

4.Use write range activity to write the data in new Excel file follow below screenshot

if you find it helpful, please mark it as solution

Happy Automation!!

EXCELのGROPBY関数でできますけど、何か不都合があるんでしょうか?
=GROUPBY(A2:B14,C2:C14,SUM)
とかで終わりですけど・・

以前調べた際にその関数を見つけたので試そうと思ったのですがExcel内の関数で調べてもGROPBY関数が出てこないのは、Excel自体の更新がされていないという事なんでしょうか。

そちらの状況はよくわかりませんが、関数をそのままセルに書いてもエラーになるってことでしょうか?
=gro くらい書けば自動補完で出てくるはずですが・・・
こんな感じかと。

Book1.xlsx (10.2 KB)

ちょっと調べたら、2025/1月時点で使えたり使えなかったりしてたようです。
バージョン古かったりするとないのかもしれません、お騒がせしました。

そうなんですね、調べてもらってすみません。
一旦、バージョンを最新なのか確認して更新してみようと思います。お手数おかけしました。

@takahashi_n

Instead of using excel formulas it is better to use linq for further as well.

if you send that excel to any one if that person did any changes in formula it can issue to that person. its better to use Linq as suggested above