Cell.BasicFormulas.VLookup Method (Worksheet, Cell.Address, Worksheet, Cell.Range, Int32, Boolean)

NanoXLSX

NanoXLSX

CellBasicFormulasVLookup Method (Worksheet, CellAddress, Worksheet, CellRange, Int32, Boolean)

Function to generate a Vlookup as Excel function

Namespace:  NanoXLSX
Assembly:  NanoXLSX (in NanoXLSX.dll) Version: 1.2.3.0 (1.2.3)
Syntax
C#
public static Cell VLookup(
	Worksheet queryTarget,
	CellAddress address,
	Worksheet rangeTarget,
	CellRange range,
	int columnIndex,
	bool exactMatch
)

Parameters

queryTarget
Type: NanoXLSXWorksheet
Target worksheet of the query argument. Can be null if on the same worksheet
address
Type: NanoXLSXCellAddress
Query address of a cell as string as source of the lookup
rangeTarget
Type: NanoXLSXWorksheet
Target worksheet of the matrix. Can be null if on the same worksheet
range
Type: NanoXLSXCellRange
Matrix of the lookup
columnIndex
Type: SystemInt32
Column index of the target column (1 based)
exactMatch
Type: SystemBoolean
If true, an exact match is applied to the lookup

Return Value

Type: Cell
Prepared Cell object, ready to be added to a worksheet
See Also