Count sold and remaining

★ 20 minutes read

Excel allows a user to count sold and remaining products, by using the COUNTA function. This can be useful for inventory purposes. This step by step tutorial will assist all levels of Excel users in counting sold and remaining.

Figure 1. The result of the function

Syntax of the COUNTA Formula

The generic formula for the COUNTA function is:


The parameter of the COUNTA function is:

  • range – a range of cells where we want to count non-blank cells.

Setting up Our Data for the COUNTA Function

Figure 2. The data that we will use in the example

In column B (“Products”), we have all the products, while in column C (“Sold Products”), we have sold products. To count remaining, unsold products, we have to count non-blank cells and subtract two columns. The result will be in the cell E3.

Counting Sold and Remaining Using the COUNTA Function

In our example, need to count non-blank cells from columns C and D and subtract these two numbers.

The formula looks like:

=COUNTA(B3:B10) - COUNTA(C3:C10)

The parameter range is B3:B10 for the first COUNTA function and C3:C10 for the second.

To apply the COUNTA function, we need to follow these steps:

  • Select cell E3 and click on it
  • Insert the formula: =COUNTA(B3:B10) - COUNTA(C3:C10)
  • Press enter

Figure 3. Using the COUNTA function to count sold and remaining

In column B, there are 8 products in the total, while in column C, we have 4 sold products (non-blank). Therefore, the result of the function in the cell E3 is 8 – 4 = 4.

Most of the time, the problem you will need to solve will be more complex than a simple application of a formula or function. If you want to save hours of research and frustration, try our live Excelchat service! Our Excel Experts are available 24/7 to answer any Excel question you may have. We guarantee a connection within 30 seconds and a customized solution within 20 minutes.

Our customers love us!
“The expert was absolutely amazing and stuck with me the whole way through. They were polite, patient, seemed to want to genuinely help me and provided a solution that I would never have managed otherwise. I could not be more thankful for their support and solution. Thank you!” - - Chris T, in California

Leave a Comment