Try running in memory:
Function ValueAtRight(sInp As String) As Variant Dim rInp As Range Dim avInp As Variant Dim iRow As Long With Worksheets("NAME2") Set rInp = Intersect(.Columns(1), .UsedRange) End With avInp = rInp.Value2 For iRow = 1 To rInp.Rows.Count If InStr(avInp(iRow, 1), sInp) Then ValueAtRight = rInp(iRow, 2) Exit Function End If Next iRow End Function
Microsoft MVP - Excel
Entia non sunt multiplicanda sine necessitate
It changes every 1-3 days
i have tried to implement your function without any success. Here is a sample workbook attached. you can run the macro and see its functionality. thanks
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks