Use COUNTIF to count items above $5

November 28, 2018

Excel

In this example we will go through how to use the Excel COUNTIF Function to count only the items that have a cost greater than $5

As you can see from the image above, we have a simple table of items with their associated cost.

You can follow along to recreate this example

What To Do

  1. Copy the following table values directly into a new Excel Spreadsheet.
Item Cost
Nails $5
Screws $5
Glass $25
Plastic Sheets $20
Wood $25
Steel Sheets $30
Wood Glue $5

Note

For my example, I started my table from cell B2 instead of A1 to make it easier to see.

Step 1: Setup Excel table

  1. In cell B11, I wrote in the text: “Count items that cost > $5”

Step 2: Add text

  1. Add the following formula

Note

We are using the static (unchanging) value “5”. We will explore using a cell reference in the COUNTIF function

Formula

=COUNTIF(C3:C9,">5")

Step 3: Using the static (unchanging) value

  1. Alternative: Using a Cell Reference

In this alternate step, we are using a cell reference. We are using the value stored in cell E3 to determine the value we are using in our COUNTIF function.

Note

Please take note at the formula below and take note of the ”&” sign before the E3 cell reference

Formula

=COUNTIF(C3:C9,">"&E3)

Step 3 Alternative: Using a cell reference





Microsoft Office 365
Microsoft Office 365