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!