Click or drag to resize
NanoXLSX

BasicFormulasVLookup(Object, Range, Int32, Boolean) Method

Function to generate a Vlookup as Excel function

Namespace: NanoXLSX
Assembly: NanoXLSX (in NanoXLSX.dll) Version: 2.6.3+98f265239ae8df4639650ecd7029244cc5e52dfc
Syntax
C#
public static Cell VLookup(
	Object number,
	Range range,
	int columnIndex,
	bool exactMatch
)

Parameters

number  Object
Numeric value for the lookup. Valid types are int, uint, long, ulong, float, double, byte, sbyte, decimal, short and ushort
range  Range
Matrix of the lookup
columnIndex  Int32
Column index of the target column within the range (1 based)
exactMatch  Boolean
If true, an exact match is applied to the lookup

Return Value

Cell
Prepared Cell object, ready to be added to a worksheet
Exceptions
ExceptionCondition
FormatExceptionA format exception is thrown if the value or column index is invalid
See Also