You just need to set the Find function LookAt
parameter to xlWhole. Here is a revised
index_on_pricing function:
Function index_on_pricing(id As String) As Long
Dim Rng As Range
Set Rng = Application.Workbooks("catalog
PRICING.xls").Sheets(1).Range("a1:a30000").Find(What:=id,
LookAt:=xlWhole)
If Rng Is Nothing Then
index_on_pricing = -1
Else
index_on_pricing = Rng.Row
End If
Set Rng = Nothing
End Function
This only executes the Find once, instead of
potentially twice per your original code. It also
defines the return value, as every function should.