Nice work, JB.
You could cut the calculation time in half by changing
=IF(ISERROR(VLOOKUP($A2, Data!$A$2:$B$120, 2,FALSE)), 0, VLOOKUP($A2, Data!$A$2:$B$120, 2, FALSE))
to
=IFERROR(VLOOKUP($A2, Data!$A$2:$B$120, 2, FALSE)), 0)
... using either the native Excel 2007 IFERROR function, or this equivalent:
Function IFERROR(ToEvaluate As Variant, Default As Variant) As Variant
If IsArray(ToEvaluate) Then
IFERROR = IIf(IsError(ToEvaluate(1)), Default, ToEvaluate)
Else
IFERROR = IIf(IsError(ToEvaluate), Default, ToEvaluate)
End If
End Function
Also, for your UniqueTeams function, time for you to take a look at the Scripting.Dictionary object.
Bookmarks