**Hello Friends Its Sachin Here with another wonderful blog on counting unique value with the help of an array formula.**

*the need of this blog arise when i was working with one GST Template and there was one column heading named number of invoice which will always show you total number of unique number of invoices. On further analyzing it i finally found the answer.*

**Wanna Know How ???**

**then Lets get started guys**

## Finding Count of Unique invoice values

Explanation – In the above image you can see that total number of invoice are 14 however the total number of unique invoice counted above by formula are 9.

This is with the help of an array formula used over there

Formula – **={SUM(1/COUNTIF($B$9:$B$22,$B$9:$B$22))}**

Explanation of the formula – {Sum(1/Countif(Range,Criteria)}

**Now lets see how does this formula work**

The above formula is the combination of SUM formula + Count If Formula + Array formula on them

**Steps in How this formula works**

As this is an array formula we have have to hit Control+Shift+Enter After entering the formula in cell.

**If you want to know how COUNT IF** work click here

**Explanation of Steps of Formula**

1.) Enter the Given Formula

2.) As this is the Array Formula which means each criteria will be evaluated against the given range of COUNT IF and as a result we will get multiple result from count if formula i:e **1,1,2,2,3,3,1,1,3,1,2,2,2,2. This is the benefit of array formulas Excel.**

**the results shows the number of times each invoice is repeating in an range.**

3.) Now all the result of Count if we got from second step will be divided from 1 and as a result we will again get multiple result.

for ex – a invoice is repeating once when divided upon 1 will result in 1 whereas a invoice repeating 2 times on dividing upon 1 will result in 0.5 and same when a invoice repeats thrice will give us 0.333

It means Sum of count of an invoice repeating twice will be 1 (0.5+0.5) and sum of count of an invoice repeating thrice will also given us **1 (0.33+0.33+0.33)**

and thus we will get sum of count of only unique values by applying this formula

## Things to be taken care of while applying this formula.

1.) DO not just enter after applying the formula hit **Control+Shift+Enter after entering formula because this is an array formula**

2.) As this is an array formula do not drag it after entering it.

## Conclusion

Apart from using the formula for counting unique invoice number we can can use it in carious other data as per our requirement.

in case of any other query you can contact me via mail at Chetnanisachin@gmail.com

**Thank you so much for giving your precious time.**

I have to show my appreciation to the writer just for bailing me out of this type of trouble. Right after browsing throughout the world wide web and obtaining thoughts that were not helpful, I figured my entire life was over. Being alive minus the solutions to the problems you have sorted out by means of your short article is a serious case, and the ones which could have negatively damaged my career if I hadn’t encountered the blog. Your own personal expertise and kindness in controlling all the things was important. I am not sure what I would have done if I had not come upon such a point like this. I’m able to at this time look ahead to my future. Thank you so much for the impressive and amazing help. I won’t hesitate to suggest your blog post to any individual who needs tips about this area.

Of course, what a great blog and illuminating posts, I definitely will bookmark your site.Best Regards!