I have created a user form with Vlookups to tell me alternative pantone colours to use.
This is working as expecting when I enter a numerical value I get alternatives (including text alternatives e.g 303 suggests 301 & black).
However, I get an error when I try to enter a colour in the initial search that includes text (e.g WG6).
If i remove "CLng" then it no longer works for my numerical values.
Anyone know what I have missed please?
Private Sub CommandButton1_Click()
Unload Me
UserForm1.Show
End Sub
Private Sub Pantonetb_afterupdate()
With Me
.rp1 = Application.WorksheetFunction.VLookup(CLng(Me.Pantonetb), Sheets("live Pantones").Range("A:F"), 5, False)
.rp2 = Application.WorksheetFunction.VLookup(CLng(Me.Pantonetb), Sheets("Live Pantones").Range("A:F"), 6, False)
End With
End Sub
Appreciate any help.
Using my comment of using

FINDandOFFSETand this data: