Go Back

Count sold and remaining

Read time: 20 minutes

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.

Did this post not answer your question? Get a solution from connecting with the expert.

Another blog reader asked this question today on Excelchat:
Here are some problems that our users have asked and received explanations on

Construct a formula to calculate the total sales of the Condiment Rack by muliplying the Quantity Sold by the retail price. Copy the formula down for the remaining products.
Solved by I. U. in 16 mins
Hello I want a formula that will recognise a date in a cell to match to a range and then count products sold
Solved by B. B. in 18 mins
Can you help me to create a function that will count the remaining days left prior the due date?
Solved by K. H. in 16 mins

Leave a Comment