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

Excelの基準でフィルターに基づいてセルをカウント/合計する方法は?

実際、Excelでは、通常のデータ範囲でCOUNTA関数とSUM関数を使用してセルをすばやくカウントおよび合計できますが、これらの関数はフィルター処理された状況では正しく機能しません。 フィルタまたは基準付きフィルタに基づいてセルをカウントまたは合計するには、この記事が役立ちます。

数式を使用したフィルターに基づいてセルをカウント/合計

Kutools forExcelを使用したフィルターに基づいてセルをカウント/合計

数式を使用して、特定の基準でフィルターに基づいてセルをカウント/合計します


数式を使用したフィルターに基づいてセルをカウント/合計

次の数式は、フィルタリングされたセル値をすばやく簡単にカウントまたは合計するのに役立ちます。次のようにしてください。

フィルタリングされたデータからセルをカウントするには、次の数式を適用します。 = SUBTOTAL(3、C6:C19) (C6:C19 は、カウントしたいフィルタリングされたデータ範囲です)、を押します 入力します キー。 スクリーンショットを参照してください:

フィルタ1に基づくドキュメント数

フィルタリングされたデータに基づいてセル値を合計するには、次の数式を適用します。 = SUBTOTAL(9、C6:C19) (C6:C19 合計したいフィルタリングされたデータ範囲です)、を押します 入力します キー。 スクリーンショットを参照してください:

フィルタ2に基づくドキュメント数


Kutools forExcelを使用したフィルターに基づいてセルをカウント/合計

あなたが持っている場合 Kutools for Excel カウントビジブル & 合計 関数は、フィルタリングされたセルを一度にカウントして合計するのにも役立ちます。

Kutools for Excel : 300以上の便利なExcelアドインがあり、30日以内に制限なしで無料で試すことができます. 

インストールした後 Kutools for Excel、フィルタリングされたセルをカウントまたは合計するには、次の数式を入力してください。

フィルタリングされたセルをカウントします:= COUNTVISIBLE(C6:C19)

フィルタリングされたセルを合計します:= SUMVISIBLE(C6:C19)

フィルタ3に基づくドキュメント数

ヒント:クリックしてこれらの機能を適用することもできます クツール > Kutools関数 > 統計と数学 > 平均可視 / 可算可視 / 可視 必要に応じて。 スクリーンショットを参照してください:

今すぐExcel用のKutoolsをダウンロードして無料トライアル!


数式を使用して、特定の基準でフィルターに基づいてセルをカウント/合計します

フィルタリングされたデータで、基準に基づいてカウントまたは合計したい場合があります。 たとえば、次のフィルタリングされたデータがあります。ここで、名前が「Nelly」である注文をカウントして合計する必要があります。 ここでは、それを解決するためのいくつかの公式を紹介します。

フィルタ5に基づくドキュメント数

特定の基準でフィルターデータに基づいてセルをカウントします。

次の式を入力してください: =SUMPRODUCT(SUBTOTAL(3,OFFSET(B6:B19,ROW(B6:B19)-MIN(ROW(B6:B19)),,1)), --( B6:B19="Nelly"))(以下、B6:B19 使用するフィルタリングされたデータとテキストです ネリー カウントしたい基準です)そしてを押します 入力します 結果を得るための鍵:

フィルタ6に基づくドキュメント数

特定の基準でフィルターデータに基づいてセルを合計します。

基準に基づいて列Cのフィルター処理された値を合計するには、次の式を入力してください。 =SUMPRODUCT(SUBTOTAL(3,OFFSET(B6:B19,ROW(B6:B19)-MIN(ROW(B6:B19)),,1)),( B6:B19="Nelly")*(C6:C19)) (B6:B19 使用する基準、テキストが含まれています ネリー が基準であり、 C6:C19 合計するセル値)を押してから、 入力します 次のスクリーンショットのように結果を返すためのキー:

フィルタ7に基づくドキュメント数

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

🤖 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 (10)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
First of all, sorry for my bad English haha.

I used Skyyang's formula, but I'm still missing a small part in my formula. I entered the following formula, but it doesn’t recognize my 2nd criteria in the answer. Can you help me further? I can share the sheet if you want.

=SOMPRODUCT(((D4:D45="Auto")+(E4:E45="Zonder vervanging")*(SUBTOTAAL(3;VERSCHUIVING(E4;RIJ(E4:E45)-RIJ(E4:E45)-3;)))))
This comment was minimized by the moderator on the site
Does anybody knows how to do this but with more than one criteria? I mean, if I wanted to COUNT only the rows which qualify for two or more criterias?
Thanks a bunch!
This comment was minimized by the moderator on the site
Hello, WN,
May be the following formula can help you:
=SUMPRODUCT( ( (B2:B23="Large")+(B2:B23="Small"))*(SUBTOTAL(103,OFFSET(B2,ROW(B2:B23)-MIN(ROW(B2:B23)),0))))

If you have more criteria, just join the criteria with + character.
Please try, hope it can help you!
This comment was minimized by the moderator on the site
If i have data in sheet 1 in trying to pull into sheet 2 that comes from a range in a column i want but I'm only looking for data that had a certain value of "system issue" and i want the second sheet to be able to see how many in that column had system issue but *** up the paid amounts in a separate column of sheet one that filter to the "system issue" so we can see how much has been paid out for system issues, thoughts on the formula? The one you keep sharing is only for 1 sheet and you keep using a number after the first parenthesis that i do not know how you came up with it.
This comment was minimized by the moderator on the site
Can this be done with more than one criteria? I mean, I know it can be as per the below answered questions. I have to have sum based on two criteria's One criteria in Row B as "RN" and another one in row DX as "D" and the sum is going to be in row EA. Any help would be great!
This comment was minimized by the moderator on the site
Does anybody knows how to do this but with more than one criteria? I mean, if I wanted to SUM only positive values?
This comment was minimized by the moderator on the site
Hi, Bernardo,
To solve your problem, you should apply below formula:
=SUMPRODUCT(SUBTOTAL(9,OFFSET(B2,ROW(B2:B14)-ROW(B2),0)),--(A2:A14="Lucy"),--(B2:B14>0))

Please try, hope it can help you!
This comment was minimized by the moderator on the site
It's absolutely ridiculous that EXCEL requires the formula to be so complicated! All that should be needed is a SUBTOTAL(9,Range) WHERE/HAVING criteria (X,Y,Z).
This comment was minimized by the moderator on the site
Yes I agree, I am looking for the Excel formula so that the sum of the range (with criteria) is NOT affected by the Filtered columns.
This comment was minimized by the moderator on the site
I agree. It is ridiculous
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations