An “x” in the Sold column indicates the item has been sold.

As is typical in Excel, there are several ways to solve this problem.

The article below explains two approaches.

Excel formula: Count matches between two columns

COUNTA function

TheCOUNTA functioncounts non-blank cells in a range.

Note that COUNTA doesn’t care what value is in a cell.

In this example, last formula above is an all-in-one formula, to provide more detail.

Excel formula: Basic inventory formula example

This minimizes the number of calculations performed and reduces errors.

COUNTIF function

TheCOUNTIF functioncounts values in a range based on suppliedcriteria.

With COUNTIF the problem can be solved a bit differently.

Excel COUNTA function

COUNTA does not count empty cells.

COUNTIF can be used to count…

Excel COUNTIF function