メインコンテンツへスキップ

Excelでグループごとに値を合計する方法は?

ここにXNUMXつの列があります。XNUMXつは製品名で、もうXNUMXつはSalesです。 次に、以下のスクリーンショットと同じ製品の売上を合計したいと思います。 どうすればExcelで解決できますか?
グループ1ごとのドキュメントの合計

式を使用してグループごとに値を合計する

Kutools for Excelを使用して、グループごとに値を計算または結合します


式を使用してグループごとに値を合計する

Excelでは、XNUMXつの数式でグループごとに値を簡単に合計できます。

データ範囲の次のセルを選択し、これを入力します = IF(A2 = A1、 ""、SUMIF(A:A、A2、B:B))、(A2は合計に基づく相対セル、A1は列ヘッダー、A:Aは合計に基づく列、B:Bは値を合計する列です。)を押します。 入力します キーを押しながら、塗りつぶしハンドルをセルまでドラッグして、数式を入力します。
グループ2ごとのドキュメントの合計


Kutools for Excelを使用して、グループごとに値を計算または結合します

カウント、最大値または最小値の検索、グループに基づく値の組み合わせなど、グループごとに他の計算を実行する場合は、次のことを試すことができます。 Kutools for Excelさん 高度な結合行 ユーティリティ。

Kutools for Excel, 以上で 300 便利な機能は、あなたの仕事をより簡単にします。 

無料インストール Kutools for Excel、以下のようにしてください:

1.データ範囲を選択し、をクリックします クツール > マージ&スプリット > 高度な結合行.
グループ3ごとのドキュメントの合計

2。 の中に 高度な結合行 ダイアログ、次のようにしてください:

1)以下に基づいて値を計算または結合するために使用されるキー列として列を指定します。

2)必要に応じて、XNUMX回の操作でオプションを選択します。
グループ4ごとのドキュメントの合計

3。 クリック Ok、次に、以下のスクリーンショットに示すように、値が計算または結合されます。

 グループ別の合計  グループで組み合わせる
グループ5ごとのドキュメントの合計   グループ6ごとのドキュメントの合計

最高のオフィス生産性向上ツール

🤖 Kutools AI アシスタント: 以下に基づいてデータ分析に革命をもたらします。 インテリジェントな実行   |  コードを生成  |  カスタム数式の作成  |  データを分析してグラフを生成する  |  Kutools関数を呼び出す...
人気の機能: 重複を検索、強調表示、または識別する   |  空白行を削除する   |  データを失わずに列またはセルを結合する   |   数式なしのラウンド ...
スーパールックアップ: 複数の基準の VLookup    複数の値の VLookup  |   複数のシートにわたる VLookup   |   ファジールックアップ ....
詳細ドロップダウン リスト: ドロップダウンリストを素早く作成する   |  依存関係のドロップダウン リスト   |  複数選択のドロップダウンリスト ....
列マネージャー: 特定の数の列を追加する  |  列の移動  |  Toggle 非表示列の表示ステータス  |  範囲と列の比較 ...
注目の機能: グリッドフォーカス   |  デザインビュー   |   ビッグフォーミュラバー    ワークブックとシートマネージャー   |  リソースライブラリ (自動テキスト)   |  日付ピッカー   |  ワークシートを組み合わせる   |  セルの暗号化/復号化    リストごとにメールを送信する   |  スーパーフィルター   |   特殊フィルター (太字/斜体/取り消し線をフィルター...) ...
上位 15 のツールセット12 テキスト ツール (テキストを追加, 文字を削除する、...)   |   50+ チャート 種類 (ガントチャート、...)   |   40+ 実用的 (誕生日に基づいて年齢を計算する、...)   |   19 挿入 ツール (QRコードを挿入, パスから画像を挿入、...)   |   12 変換 ツール (数字から言葉へ, 通貨の換算、...)   |   7 マージ&スプリット ツール (高度な結合行, 分割セル、...)   |   ... もっと

Kutools for Excel で Excel スキルを強化し、これまでにない効率を体験してください。 Kutools for Excelは、生産性を向上させ、時間を節約するための300以上の高度な機能を提供します。  最も必要な機能を入手するにはここをクリックしてください...

説明


Officeタブは、タブ付きのインターフェイスをOfficeにもたらし、作​​業をはるかに簡単にします

  • Word、Excel、PowerPointでタブ付きの編集と読み取りを有効にする、パブリッシャー、アクセス、Visioおよびプロジェクト。
  • 新しいウィンドウではなく、同じウィンドウの新しいタブで複数のドキュメントを開いて作成します。
  • 生産性を 50% 向上させ、毎日何百回もマウス クリックを減らすことができます!
Comments (7)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
hi what if the date is also added to it and then how we can calculate total for particular item, date wise. see below
Date item qty
3-Mar-21 blue 24
3-Mar-21 green 15
3-Mar-21 green 46
3-Mar-21 Blue 54
3-Mar-21 Red 6
4-Mar-21 Red 18
4-Mar-21 Blue 21
4-Mar-21 green 39
4-Mar-21 green 52
4-Mar-21 red 35
4-Mar-21 blue 19
5-Mar-21 green 54
5-Mar-21 green 26
5-Mar-21 Blue 29
5-Mar-21 Red 31
5-Mar-21 Red 74
5-Mar-21 Blue 20
5-Mar-21 green 85
5-Mar-21 green 56
This comment was minimized by the moderator on the site
Not exactly working for me. The A1 in the A2=A1 is does not stay constant once pasted and is off always by one row. If I lock the cell, in my case =IF(A2=$A$1,"",SUMIF(A:A,A2,H:H)), The formula works but populates in every column cell.
This comment was minimized by the moderator on the site
How use =IF(A2=A1,"",SUMIF(A:A,A2,B:B))
If in coloumn A data Blue is come after black
This comment was minimized by the moderator on the site
Please Reply
This comment was minimized by the moderator on the site
You can sort the data firstly to make sure that same data together.
This comment was minimized by the moderator on the site
Sum Values By Group. Nice to have a good reference for users not familiar with excel formula scripting. I have used the same script but I cannot find a way to sort the result based on the summed values, in your example, I like to get summed valued from highest to lowest (105, 96, 83). I was able to do it by creating another column (say column D) to copy the summed amount corresponding to product (say, Blue will have 96 for D2, D3, D4 / 83 for D5, D6 and so on) then sort column D. But I think that is a crude way of doing it. Is there a built-in function in Excel or Kutools to have the sum and sort (based on summed values). Thanks
This comment was minimized by the moderator on the site
Skip the IF part and just use =SUMIF(A:A,A2,B:B)
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations