Create a worksheet named Ref in the add-in, add your data there as Joseph suggested, add a named range to reference it, and put this code (modestly adapted from Joseph's, and completly untested) in the add-in:
Sub lg()
Dim vData As Variant
Dim n As Long
Dim sName As String
Dim wks As Worksheet
vData = ThisWorkbook.Worksheets("Ref").Range("ref_table").Value
Set wks = ActiveSheet
sName = wks.Parent.Name
For n = LBound(vData) To UBound(vData)
If InStr(sName, vData(n, 1)) Then
With wks.Range(vData(n, 3))
.Value = vData(n, 2)
Application.Goto .Cells
End With
Exit For
End If
Next n
End Sub
Bookmarks