Excel

From neil.tappsville.com
Revision as of 07:56, 3 September 2019 by Gonzo (talk | contribs) (Created page with "===Overcome Vlookup key limit=== Open excel, alt-f11, this workbook - insert module <pre> Function My Vlookup(Lval As Range, c As Range, oset As Long) As Variant Dim cl...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Overcome Vlookup key limit

Open excel, alt-f11, this workbook - insert module


Function [[My Vlookup]](Lval As Range, c As Range, oset As Long) As Variant
Dim cl As Range
For Each cl In c.Columns(1).Cells
: If UCase(Lval) = UCase(cl) Then
: [[My Vlookup]] = cl.Offset(, oset - 1)
: Exit Function
: End If
: Next
End Function