Important notice for users of Office 2003 To continue receiving security updates for Office, make sure you're running Office 2003 Service Pack 3 (SP3). The support for Office 2003 ends April 8, 2014. If you’re running Office 2003 after support ends, to receive all important security updates for Office, you need to upgrade to a later version such as Office 365 or Office 2013. For more information, see Support is ending for Office 2003.
To count numbers greater than or less than a number, use the COUNTIF function. To count numbers that fall between a range of numbers, you can use the SUMPRODUCT function.
The example may be easier to understand if you copy it to a blank worksheet.
How to copy an example
- Create a blank workbook or worksheet.
- Select the example in the Help topic.
Important Do not select the row or column headers.
- Press CTRL+C.
- In the worksheet, select cell A1, and press CTRL+V.
To switch between viewing the results and viewing the formulas that return the results, press CTRL+` (grave accent), or on the Formulas tab, in the Formula Auditing group, click the Show Formulas button.
||Numbers above 9000 (3)
||Numbers less than or equal to 9000 (3)
||The SUMPRODUCT function counts the number of cells in the range B2:B7 that contain numbers greater than or equal to 9000 and less than or equal to 22500 (4).
The COUNTIF function counts the number of cells within a range that meet a single criterion (condition) that you specify.
The SUMPRODUCT function can be used to count numbers by specifying multiple ranges and multiple criteria. In the example, B2:B7 is the range used for each criterion, which are >=9000 and B2:B7<=22500.
For more information, see COUNTIF and SUMPRODUCT.