ThisCalculator

Everyday

Count Cells That Contain Positive Numbers in Excel

Updated · Standard formula, shown below

Count Cells That Contain Positive Numbers in Excel

To count cells that contain positive numbers, use Excel’s COUNTIF function with the criterion “>0”: =COUNTIF(A1:A10,">0"). It counts numeric values greater than zero in the selected range and returns the number of matching cells.

Formula

The formula is =COUNTIF(range,">0"). In words, COUNTIF examines each cell in the specified range and counts it when its value is greater than zero.

  • range is the cell range to examine, such as A1:A10.
  • ">0" is the condition: greater than zero. The quotation marks are required because the condition is written as text inside the function.
  • The result is a count of qualifying cells, not the sum of their values.

Worked Example

Suppose cells A1:A10 contain these entries: 5, 0, -3, 2.5, a blank, "7" stored as text, 12, -0.1, 1, and 0.

  1. Enter =COUNTIF(A1:A10,">0") in an empty cell.
  2. Excel checks the numeric entries against the condition greater than zero. The positive numeric values are 5, 2.5, 12, and 1.
  3. Zero and negative values do not qualify; the blank and text entry are not counted as positive numbers.
  4. The result is 4.

A numeric-looking entry stored as text may behave differently depending on how it was entered and how the range is evaluated. If you expect it to count, convert it to a real number and check the result.

What Counts as a Positive Number?

A positive number is any numeric value strictly greater than zero. That includes whole numbers such as 4, decimals such as 0.25, and negative-looking values are excluded. Zero is neither positive nor negative for this test, so it does not meet the condition.

COUNTIF is a counting function, not a test for whether a cell merely contains something. A cell with a word, date-like text, or a formula returning an empty string does not count as a positive numeric value. Dates in spreadsheets are stored as numbers, so a valid date can meet a greater-than-zero test. If your range includes dates, exclude those cells or refine the range to avoid counting them accidentally.

How to Choose the Right Range

Replace A1:A10 with the cells that hold the data you want to inspect. A range can be a column segment, row, or rectangular block, for example B2:B500, C3:H20, or D:D. Whole-column references are convenient, though a bounded range can make a workbook easier to audit and may avoid examining irrelevant cells.

  • Use a single range when all values are in one contiguous set of cells.
  • For separate sections, add multiple COUNTIF results, such as =COUNTIF(A1:A10,">0")+COUNTIF(C1:C10,">0").
  • If you need to count only positive numbers that also meet another condition, use COUNTIFS. For example, count positive amounts in B2:B100 only where the corresponding status in A2:A100 is “Paid”: =COUNTIFS(B2:B100,">0",A2:A100,"Paid").

Common Mistakes and Troubleshooting

The most frequent mistake is leaving out the quotation marks around the criterion. Use ">0", not >0 as an unquoted argument. Also make sure the range is the one containing the numbers; selecting a nearby label column can produce a valid formula with an unexpected count.

  • Zero is included by mistake: Check that the operator is >, not >=. The latter counts zeros too.
  • Text numbers are skipped: A value that looks like 7 may be stored as text. Convert it to a numeric value, for example using the spreadsheet’s conversion tools or by correcting the source data.
  • Unexpected date counts: Spreadsheet dates are numeric serial values. Avoid including date columns in a positive-number count unless that is intended.
  • Formula results are confusing: A formula that displays a number can generally be evaluated by its resulting value; a formula returning text or an empty string is not a positive number.
  • The formula shows an error: Check the range syntax and quotation marks. Depending on regional settings, a spreadsheet may use semicolons instead of commas between function arguments.

Formatting does not determine whether a value is positive. A cell displayed as currency, a percentage, or a decimal can still be counted according to its underlying numeric value. For instance, 0.08 formatted as 8% is positive and qualifies.

Related Counting Options

Choose the condition that matches the question you actually need to answer:

  • =COUNTIF(A1:A10,">0") counts positive numeric values.
  • =COUNTIF(A1:A10,">=0") counts zero and positive values.
  • =COUNTIF(A1:A10,"<0") counts negative values.
  • =COUNT(A1:A10) counts numeric cells, including zero and negative numbers, rather than only positive ones.
  • =COUNTA(A1:A10) counts nonempty cells, including text, so it answers a different question.

These distinctions prevent a common misunderstanding: COUNT does not mean “count cells above zero,” and COUNTA does not mean “count numbers.” For a threshold-based count, COUNTIF makes the condition explicit.

Frequently Asked Questions

Does COUNTIF count zero as a positive number?
No. The criterion ">0" requires a value strictly greater than zero. Use ">=0" if zero should be included.

How do I count positive numbers in an entire column?
Use a whole-column reference such as =COUNTIF(A:A,">0"). If the column contains dates or unrelated numeric data, use a narrower range instead.

Will COUNTIF count decimal values?
Yes. Any numeric value greater than zero qualifies, including decimals such as 0.01 or 3.75.

Why is a number that looks positive not counted?
It may be stored as text, be outside the selected range, or be the result of a formula returning text. Check the cell’s actual value and convert text-formatted numbers when appropriate.

Can I count positive numbers with another condition?
Yes. Use COUNTIFS to apply multiple criteria, such as a positive amount in one column and a matching category or status in another.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.