Count different numbers only

Stingrad

New Member
Joined
Jul 4, 2002
Messages
30
I have got a list of job numbers that are 10 digits long. If an address has multiple jobs it has the same job number. I need to count the number of different job numbers so I know how many properties are being visited.
i.e
1000203021
1000203021
1000232312
would count as 2 and not 3

Thanks in advance for any help
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Array-enter...

=SUM(IF(LEN(A1:A3),1/COUNTIF(A1:A3,A1:A3)))

To array-enter a formula, you need to hit control+shift+enter at the same time, not just enter.
 
Upvote 0
On 2003-01-27 06:32, Stingrad wrote:
That works great would you mind breaking it down so I can understand how it works though.

Thanks

Neill,

In B1 enter & copy down:

=IF(LEN(A1),1/COUNTIF($A$1:$A$3,A1),"")

then

=SUM(B1:B3)

The array-formula does the above computations in one go.

If an item's frequency of occurrence is 2, it's contribution to the sum is halved, that is, 1/2 = .5.

Thus, the formula is based on assigning to each token of a type the weight that consists of 1 divided by the number of tokens of the type.

Aladin
 
Upvote 0

Forum statistics

Threads
1,214,824
Messages
6,121,783
Members
449,049
Latest member
greyangel23

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top