This won't spill. If I understand correctly try this in D2 and double click the fill handle to copy all the way down.Formula:
=LOOKUP(YEAR(B2),{1995,2003},{1;1})*INDEX(FREQUENCY(C2,3-1/10^7),2)
Even over 50,000 + rows this should be lightning fast.
Bookmarks