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

Excelの基準に基づいて一意の値を合計するにはどうすればよいですか?

たとえば、次のスクリーンショットに示すように、[名前]列に基づいて[注文]列の一意の値のみを合計するために、[名前]列と[注文]列を含むデータの範囲があります。 このタスクをExcelですばやく簡単に解決するにはどうすればよいですか?

配列数式を使用して、XNUMXつ以上の基準に基づいて一意の値を合計します


配列数式を使用して、XNUMXつ以上の基準に基づいて一意の値を合計します

別の列の基準に基づいて一意の値のみを合計するには、次の式を使用してください。

1。 次の配列数式をコピーするか、空白のセルに入力してください。

=SUM(IF(FREQUENCY(IF($A$2:$A$12=D2,MATCH($B$2:$B$12,$B$2:$B$12,0)),ROW($B$2:$B$12)-ROW($B$2)+1),$B$2:$B$12))

Note:上記の式では、 A2:A12 列データには条件値が含まれています。 D2 に基づいて値を合計する条件です。 B2:B12 列には、合計する値が含まれています。

2。 次に、 Ctrl + Shift + Enter キーを合わせて最初の合計結果を取得してから、この数式セルを選択し、塗りつぶしハンドルをセルまでドラッグして、各アイテムのすべての合計値を取得します。 スクリーンショットを参照してください:

ヒント:XNUMXつの基準に基づいてすべての一意の値を合計する必要がある場合は、次の式を適用してください。

=SUM(IF(FREQUENCY(IF($A$2:$A$12=E2,IF($B$2:$B$12=F2,MATCH($C$2:$C$12,$C$2:$C$12,0))),ROW($C$2:$C$12)-ROW($C$2)+1),$C$2:$C$12))


より相対的な記事:

  • Excelの単一の基準に基づいて複数の列を合計する
  • Excelでは、常にXNUMXつの基準に基づいて複数の列を合計する必要がある場合があります。 たとえば、次のスクリーンショットに示すようなさまざまなデータがあります。ここで、XNUMX月、XNUMX月、XNUMX月のXNUMXか月間のKTEの合計値を取得したいと思います。
  • Excelの行または列でのVlookupと合計の一致
  • vlookupとsum関数を使用すると、指定された基準をすばやく見つけて、対応する値を同時に合計するのに役立ちます。 この記事では、Excelの行または列で最初またはすべての一致した値をvlookupして合計するXNUMXつの方法を紹介します。
  • Excelの月と年に基づく合計値
  • データの範囲がある場合、列Aにはいくつかの日付が含まれ、列Bには注文数が含まれます。ここで、別の列の月と年に基づいて数値を合計する必要があります。 この場合、2016年XNUMX月の合計注文数を計算して、次の結果を得たいと思います。 そしてこの記事では、Excelでこの仕事を解決するためのいくつかの秘訣についてお話します。
  • Excelのテキスト基準に基づく合計値
  • Excelで、テキスト基準の別の列に基づいて値を合計しようとしたことがありますか? たとえば、次のスクリーンショットに示すように、ワークシートにデータの範囲があります。次に、列Aのテキスト値に対応する、列Bのすべての数値を合計して、特定の基準を満たすものとします。列AのセルにはKTEが含まれています。
  • Excelのドロップダウンリストの選択に基づく合計値
  • 以下のスクリーンショットに示すように、カテゴリ列と金額列を含むテーブルがあり、すべてのカテゴリを含むデータ検証ドロップダウンリストを作成しました。 ドロップダウンリストから任意の種類のカテゴリを選択する場合、列Bの対応するすべてのセル値を合計し、その結果を指定したセルに入力します。 たとえば、ドロップダウンリストからカテゴリCCを選択する場合、セルB5とB8の値を合計して、合計数40 + 70 = 110を取得する必要があります。 それを達成する方法は? この記事の方法はあなたを助けることができます。

  • スーパーフォーミュラバー (複数行のテキストと数式を簡単に編集できます); 読書レイアウト (多数のセルを簡単に読み取って編集する); フィルター範囲に貼り付け...
  • セル/行/列をマージする およびデータの保持。 分割セルコンテンツ; 重複する行と合計/平均を組み合わせる...重複セルを防止します。 範囲を比較する...
  • [複製]または[一意]を選択します 行; 空白行を選択 (すべてのセルは空です); スーパーファインドとファジーファインド 多くのワークブックで; ランダム選択...
  • 正確なコピー 数式参照を変更せずに複数のセル。 参照の自動作成 複数のシートに; 箇条書きを挿入、チェックボックスなど...
  • お気に入りの数式をすばやく挿入する、範囲、チャート、写真; セルを暗号化する パスワード付き。 メーリングリストを作成する そしてメールを送る...
  • テキストを抽出、テキストの追加、位置による削除、 スペースを削除する; ページング小計の作成と印刷。 セルの内容とコメントを変換する...
  • スーパーフィルター (フィルタースキームを保存して他のシートに適用します); 高度な並べ替え 月/週/日、頻度など。 特殊フィルター 太字、斜体...
  • ワークブックとワークシートを組み合わせる; キー列に基づいてテーブルをマージします。 データを複数のシートに分割; xls、xlsx、PDFをバッチ変換...
  • ピボットテーブルのグループ化 週番号、曜日など... ロック解除された、ロックされたセルを表示する さまざまな色で; 式/名前を持つセルを強調表示する...
kteタブ201905
  • Word、Excel、PowerPointでタブ付きの編集と読み取りを有効にする、パブリッシャー、アクセス、Visioおよびプロジェクト。
  • 新しいウィンドウではなく、同じウィンドウの新しいタブで複数のドキュメントを開いて作成します。
  • 生産性を 50% 向上させ、毎日何百回もマウス クリックを減らすことができます!
officetab下部
Comments (9)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
I have column "A" listed with various Part nos. Say 50 parts. Each of these 50 parts will be repeated more than once. I column B where in for each of these part nos stock qty say for particular part no 1000 is the qty. This 1000 Qty is shown againt that particular part no in whichever cell it comes in column 'A".

The problem i am facing is sum total of column B is not correct as stock qty is shown n-number of times that particular part finds place in column A.

How do i avoid totaling up this repeated stock qty of one unique part. Say part no P1001 stock is 1000nos. If delivery date of this part P1001 is

Part no..Date.............Qty......Stock
P1001....05-10-22 .....150......1000
P1001....06-10-22......200.....1000
P1001....07-10-22.......250.....1000

in the above table stock is only 1000 but it shows against each delivery date the same stock qty. But when i want to sum the total stock of all part nos it should not take 1000 3 times but only 1 time. How do this?
This comment was minimized by the moderator on the site
Hello, Pugazh
Did you want to sum only the unique stock based on the part number?
Or you can give your problem as a creenshot here, so that, we can understand more clearly.
Thank you!
This comment was minimized by the moderator on the site
Hi,

I was wondering if there was a formula for three criteria? Or if there's a process/logic to follow for more than two criteria ?

Many thanks,
Gus
This comment was minimized by the moderator on the site
Hello, Gus,
If there are three criteria of your data, to sum the unique values, please apply the below array formula:
=SUM(IF(FREQUENCY(IF($A$2:$A$10=F2,IF($B$2:$B$10=G2,IF($C$2:$C$10=H2,MATCH($D$2:$D$10,$D$2:$D$10,0)))),ROW($D$2:$D$10)-ROW($C$2)+1),$D$2:$D$10))

After inserting the formula, please press press Ctrl + Shift + Enter keys together to get the result. see below screenshot:
https://www.extendoffice.com/images/stories/comments/comment-skyyang/doc-sum-unique.png
Please have a try, thank you!
This comment was minimized by the moderator on the site
Hi,
I would like to sum based on two unique criteria, is this possible?
In the second example, rather than James and October being the specific criteria, James would stay the specific element, and the formula would sum based on the name and the month being unique.
Many thanks
Louise
This comment was minimized by the moderator on the site
Hola me podrias ayudar deseo sumar o contar solo valores unicos de fechas especificas me puedes ayudar ya que la formula =SUM(IF(FREQUENCY(IF($A$2:$A$12=D2,MATCH($B$2:$B$12,$B$2:$B$12,0)),ROW($B$2:$B$12)-ROW($B$2)+1),$B$2:$B$12)) me sirve pero como esta en ingles no se como colocarla, te agradezco mucho
This comment was minimized by the moderator on the site
Hello Jorge,

Formula: =SUM(IF(FREQUENCY(IF($A$2:$A$12=E2,IF($B$2:$B$12=F2,MATCH($C$2:$C$12,$C$2:$C$12,0))),ROW($C$2:$C$12)-ROW($C$2)+1),$C$2:$C$12))

Translate the English version formula into the Spanish version:
=SUMA(SI(FRECUENCIA(SI($A$2:$A$12=E2,SI($B$2:$B$12=F2,COINCIDIR($C$2:$C$12,$C$2:$C$12,0))),FILA($C$2:$C$12)-FILA($C$2)+1),$C$2:$C$12))

Please have a try.

Sincerely,
Mandy
This comment was minimized by the moderator on the site
This doesn't actually work as I would have expected. The formula is only counting the unique criteria.

James had 700 units ordered in the first example, yet the total says 600.

The formula won't count his orders that contain the same qty because they are unique. Is there a way to modify this formula so you can get an actual total of all of James' orders?

The second formula has the same issue. James ordered 400 units, not 300 as shown in the summary. 
This comment was minimized by the moderator on the site
Hello, kc, May be the below article can solve your problem, please try:https://www.extendoffice.com/documents/excel/2471-excel-sumif-multiple-criteria.html
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations