Fandom

Microsoft Wikia

Microsoft Excel/Excel 2010/Snippets/Functions

< Microsoft Excel | Excel 2010 | Snippets

870pages on
this wiki
Add New Page
Talk0 Share

Application

Microsoft Excel/Excel 2010/Snippets/Functions/Application

Workbook

Microsoft Excel/Excel 2010/Snippets/Functions/Workbook

Worksheet

Lookup

Reverse


'@key - Variant value, the value to lookup in the @src column
'@keylst - Range object, the Range to lookup @key in.
'@vallst - Range object, the Range to obtain the value from the position of @key in @keylst
'@col - Long value, (Optional) The column within @vallst that contains the value
'        in respect to the row obtained through @key search in @keylst.
'     - Defaults to 1, or first column in the range
Function RevLookup(key, _
                  keylst As range, valrange As range, _
                  Optional col As Long = 1)
   Dim row As Variant
   row = ExactMatch(key, keylst)
 
   RevLookup = Index(valrange, row, col)
End Function


Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.