Top Description Fields Constructors Methods
org.apache.poi.ss.formula.functions

public final Class Vlookup

extends Var3or4ArgFunction
Class Inheritance
Imports
org.apache.poi.ss.formula.eval.BoolEval, .EvaluationException, .OperandResolver, .ValueEval, org.apache.poi.ss.formula.functions.LookupUtils.ValueVector, org.apache.poi.ss.formula.TwoDEval

Implementation of the VLOOKUP() function.

VLOOKUP finds a row in a lookup table by the first column value and returns the value from another column.
Syntax:
VLOOKUP(lookup_value, table_array, col_index_num, range_lookup)

lookup_value The value to be found in the first column of the table array.
table_array An area reference for the lookup data.
col_index_num a 1 based index specifying which column value of the lookup data will be returned.
range_lookup If TRUE (default), VLOOKUP finds the largest value less than or equal to the lookup_value. If FALSE, only exact matches will be considered

Field Summary

Modifier and TypeField and Description
private static final ValueEval

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private LookupUtils.ValueVector
createResultColumnVector(TwoDEval tableArray, int
assumed to be non-negative
colIndex
)

Returns one column from an AreaEval

public ValueEval
public ValueEval
evaluate(int srcRowIndex, int srcColumnIndex, ValueEval lookup_value, ValueEval table_array, ValueEval col_index, ValueEval range_lookup)

Implements org.apache.poi.ss.formula.functions.Function4Arg.evaluate.

see Function#evaluate(ValueEval[], int, int)

Inherited from org.apache.poi.ss.formula.functions.Var3or4ArgFunction:
evaluate

Field Detail

DEFAULT_ARG3back to summary
private static final ValueEval DEFAULT_ARG3

Constructor Detail

Vlookupback to summary
public Vlookup()

Method Detail

createResultColumnVectorback to summary
private LookupUtils.ValueVector createResultColumnVector(TwoDEval tableArray, int colIndex) throws EvaluationException

Returns one column from an AreaEval

Parameters
colIndex:int

assumed to be non-negative

Exceptions
EvaluationException:
(#REF!) if colIndex is too high
evaluateback to summary
public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval arg0, ValueEval arg1, ValueEval arg2)

Implements org.apache.poi.ss.formula.functions.Function3Arg.evaluate.

Doc from org.apache.poi.ss.formula.functions.Function3Arg.evaluate.

see Function#evaluate(ValueEval[], int, int)

Annotations
@Override
evaluateback to summary
public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval lookup_value, ValueEval table_array, ValueEval col_index, ValueEval range_lookup)

Implements org.apache.poi.ss.formula.functions.Function4Arg.evaluate.

Doc from org.apache.poi.ss.formula.functions.Function4Arg.evaluate.

see Function#evaluate(ValueEval[], int, int)

Annotations
@Override