# Fromula to Count Number of Unequie Values

#### Browneh89

##### Board Regular
Hello, I am attempting to find a formula which counts the number of unique values in a table attached to a certain ID.

I attempted a formula like this one below (this formula is not for the table below it was just the example I was working with)

=SUM(IF("Tom"=\$C\$2:\$C\$20, 1/(COUNTIFS(\$C\$2:\$C\$20, "Tom", \$A\$2:\$A\$20, \$A\$2:\$A\$20)), 0))

However it overloaded my excel because the table I'm looking at has over 2000 rows of data.

Are there any other ways or formulas to achieve the result show below. (Below I'm using a simplified version of the table I'm using)

Basically I'm looking to be able to find the number of unique route values for certain ID's in another table.

Thank you for any help!

#### Fluff

##### MrExcel MVP, Moderator
You're welcome & thanks for the feedback.

### Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest

Replies
1
Views
117
Replies
1
Views
57
Replies
3
Views
82
Replies
14
Views
115
Replies
19
Views
277

1,136,643
Messages
5,676,965
Members
419,665
Latest member
allsmilees2

### 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.

### Which adblocker are you using?

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

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