Count numbers greater than or less than a number
You can use the COUNTIF function and operator to create a formula that counts the numbers in a list that are greater than or less than another number.
-
Select the cell where you want to display the count results. This is where the formula will be entered.
-
On the Formulas tab, under Function, click Formula Builder.
-
In the Formula Builder, double-click COUNTIF.
-
Under Arguments, click the box next to range, and then enter the range of cells you want to examine.
-
Under Arguments, click the box next to criteria, and then type the greater-than symbol (>) or less-than symbol (<), and the value you want to search above or below.
-
Press RETURN .
The result appears in the cell where you entered the formula.
View an example
You have been tracking inventory in the sheet below. Use the formula in the following table to summarize your inventory transactions.
Transaction | Date | Location | Item | Quantity |
201000 | 5/1 | California | tent | 2 |
201001 | 5/4 | Washington | headlamp | 2 |
201002 | 5/5 | Washington | sleeping bag | -1 |
201003 | 5/5 | Washington | headlamp | 1 |
201004 | 5/6 | California | tent | -3 |
201005 | 5/13 | Oregon | backpack | -1 |
201006 | 5/16 | Oregon | backpack | -1 |
201007 | 5/19 | California | car rack | 2 |
201008 | 5/21 | California | backpack | 1 |
201009 | 5/28 | California | car rack | 1 |
Formula | Description (Result) | |||
=COUNTIF(E2:E11,<0) | The number of transactions where an item left the warehouse (4). |
See also
Calculation operators and order of operations
Ways to count cells in a range of data
No comments:
Post a Comment