Vlookup off multiple columns
You can use this UDF. Open VBE (Alt+F11), Insert - Module. Paste this in:
'================
Function MultiLookup(Lookup_Value, _
Lookup_Array As Range, Return_Array As Range)
With Lookup_Array
Set c = .Find(Lookup_Value, LookIn:=xlValues)
MultiLookup = Cells(c.Row, Return_Array.Column).Value
End With
End Function
'================
Back in your workbook, your formula would be:
=MultiLookup("ZZ",A:C,D:D)
--
Best Regards,
Luke M
*Remember to click "yes" if this post helped you!*
"James" wrote:
Hello there
I am trying to do a vlookup off multiple columns. For example below if I am
trying to find the result of "22" for a value "ZZ" in columns A to C below
how to I tell it to lookup in all 3 columns i.e. A-C and return the result in
column D?
A B C D
ZX ZZ ZA 22
--
James.
|