WorksheetFunction.Lookup (Excel)

Returns a value either from a one-row or one-column range or from an array. The Lookup function has two syntax forms: the vector form and the array form.

Lookup (Arg1, Arg2, Arg3)


Dim arrLookup() As Variant
arrLookup() = WorksheetFunction.Lookup(Arg1:=, Arg2:=)

Arguments

Arg1, Arg2, Arg3

Arg1 - Lookup_value - A value that Lookup searches for in the first vector. Lookup_value can be a number, text, a logical value, or a name or reference that refers to a value

Arg2 - Lookup_vector or Array - In vector form, a range that contains only one row or one column. The values in lookup_vector can be text, numbers, or logical values. In array form, a range of cells that contains text, numbers, or logical values that you want to compare with lookup_value

Arg3 - Result_vector - Only used with the vector form. A range that contains only one row or column. It must be the same size as lookup_vector