November 28, 2018
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
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.
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")
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)