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

Excelで正または負の数のみをカウント/合計する方法は?

通常、ワークシート内のデータの範囲を合計またはカウントするのは簡単ですが、ここでは、正または負の数のみをカウントまたは合計したいと思います。 この問題を解決するための効果的な方法はありますか?

数式を使用して、範囲内の正または負の数のみをカウントします

数式を使用して、範囲内の正または負の数のみを合計します


数式を使用して、範囲内の正または負の数のみをカウントします

ここで、COUNTIF関数は、範囲内の正の数または負の数の数をすばやく数えるのに役立ちます。

1。 正の値のみをカウントするには、空白のセルに次の数式を入力してください = COUNTIF($ A $ 1:$ D $ 7、 "> 0") その中に、スクリーンショットを参照してください:

doc-count-positives1

2。 次に、 入力します キーを押すと、すべての正の数がカウントされ、結果がセルに表示されます。 スクリーンショットを参照してください:

doc-count-positives1

注意:

1.負の値の数のみをカウントする場合は、この式を適用してください = COUNTIF($ A $ 1:$ D $ 7、 "<0").

2.そして、上記の式では、 A1:D7 使用するデータ範囲です。


数式を使用して、範囲内の正または負の数のみを合計します

Excelでは、SUMIF関数を使用すると、正の値または負の値のみを合計できます。 この式は次のように適用できます。

1。 この式を入力します = SUMIF($ A $ 1:$ D $ 7、 "> 0") 空白のセルに、スクリーンショットを参照してください。

doc-count-positives1

2。 次に、 入力します キー、そして正の数のすべてが合計されています。

doc-count-positives1

注意:

1.範囲内のすべての負の数を合計するには、次の式を使用してください = SUMIF($ A $ 1:$ D $ 7、 "<0").

2.上記の式では、 A1:D7 使用するデータ範囲です。


関連記事:

Excelのセル範囲の太字の数値を合計/カウントするにはどうすればよいですか?

Excelでエラーセル/非エラーセルの数を数える方法は?

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

🤖 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 (15)
Rated 5 out of 5 · 1 ratings
This comment was minimized by the moderator on the site
=SUMIF($H$9:$H$39;">0") el carácter es ; no ,
This comment was minimized by the moderator on the site
Hello Sir, i need a solution/Formula to count negative numbers from different cells e.g i have three column of deposit (Current Account, Saving Account and Total Deposit) in 12 months and count in how many many months one branch miss the Current, saving and total budget. but when i use =countifs(C1,E1,F1.....,",0") but it only accept range not selected cell what will be the solution. thanks

e.g
This comment was minimized by the moderator on the site
Hello, i need a solution/Formula to count negative numbers from different cells e.g i have three column of deposit (Current Account, Saving Account and Total Deposit) in 12 months and count in how many many months one branch miss the Current, saving and total budget. but when i use =countifs(C1,E1,F1.....,",0") but it only accept range not selected cell what will be the solution. thanks
This comment was minimized by the moderator on the site
Gracias!! por fortuna escontre está página donde encontré Soluciones. 👍
Rated 5 out of 5
This comment was minimized by the moderator on the site
Bonjour à tous,

je suis novice en excel. Existe il une fonction qui calcule automatiquement la différence entre deux nombres en incluant soit - où + devant le résultat.:
exemple, 1735-1685 = +50. (je l'ai fait avec la fonction somme automatique, mais je n'ai pas le + devant le résultat.
Pouvez vous m'envoyer un exemple de la formule avec ces nombres
Cdlt
This comment was minimized by the moderator on the site
Hello, LYS
Normally, there isn't a function to sove your problem, but, you can apply the SUM function to get the results first, and then use the Format Cells feature to set +0;-0;0 for the numbers, please see the below screenshot:
https://www.extendoffice.com/images/stories/comments/comment-skyyang/doc-format-cells.png

Please have a try, hope it can help you!
This comment was minimized by the moderator on the site
Thank you!!! This worked like a charm for my bank's annoying single "amount" column.
This comment was minimized by the moderator on the site
Thanks a lot!
This comment was minimized by the moderator on the site
How to use the Countif formula to count Positive AND Negative values but exclude ZEROS from the counting?

For example (data below):
1
3
0
-5
0
-1
7

The Total counting that I am expecting is equal to 5.

I thought the formula should be like =COUNTIF(N18:N320,"<>0")
But it is not working in the way that I imagined.
Can anyone help please?

Thanks,
Fernando
This comment was minimized by the moderator on the site
@Ferras,


=(COUNTIF(N18:N320,">0")+COUNTIF(N18:N320,"<0"))

Try it and let me know.
This comment was minimized by the moderator on the site
=COUNTIF(N18:N320,"<>0").....Works for me
This comment was minimized by the moderator on the site
how to change color of the cell automatically, according to profit and loss
This comment was minimized by the moderator on the site
How can I add only the numbers that will give me 0? Thank you
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations