Click or drag to resize
NanoXLSX

BasicFormulasVLookup(Worksheet, Address, Worksheet, Range, Int32, Boolean) Method

Function to generate a Vlookup as Excel function

Namespace: NanoXLSX
Assembly: NanoXLSX (in NanoXLSX.dll) Version: 2.6.4+e304ab0274fa680d1e83f83c8f76c3bd5a54caf2
Syntax
C#
public static Cell VLookup(
	Worksheet queryTarget,
	Address address,
	Worksheet rangeTarget,
	Range range,
	int columnIndex,
	bool exactMatch
)

Parameters

queryTarget  Worksheet
Target worksheet of the query argument. Can be null if on the same worksheet
address  Address
Query address of a cell as string as source of the lookup
rangeTarget  Worksheet
Target worksheet of the matrix. Can be null if on the same worksheet
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 column index is invalid
See Also