View | Details | Raw Unified | Return to bug 64238
Collapse All | Expand All

(-)a/src/java/org/apache/poi/ss/formula/functions/LookupUtils.java (+6 lines)
Lines 25-30 import org.apache.poi.ss.formula.eval.BlankEval; Link Here
25
import org.apache.poi.ss.formula.eval.BoolEval;
25
import org.apache.poi.ss.formula.eval.BoolEval;
26
import org.apache.poi.ss.formula.eval.ErrorEval;
26
import org.apache.poi.ss.formula.eval.ErrorEval;
27
import org.apache.poi.ss.formula.eval.EvaluationException;
27
import org.apache.poi.ss.formula.eval.EvaluationException;
28
import org.apache.poi.ss.formula.eval.MissingArgEval;
28
import org.apache.poi.ss.formula.eval.NumberEval;
29
import org.apache.poi.ss.formula.eval.NumberEval;
29
import org.apache.poi.ss.formula.eval.NumericValueEval;
30
import org.apache.poi.ss.formula.eval.NumericValueEval;
30
import org.apache.poi.ss.formula.eval.OperandResolver;
31
import org.apache.poi.ss.formula.eval.OperandResolver;
Lines 434-439 final class LookupUtils { Link Here
434
	public static boolean resolveRangeLookupArg(ValueEval rangeLookupArg, int srcCellRow, int srcCellCol) throws EvaluationException {
435
	public static boolean resolveRangeLookupArg(ValueEval rangeLookupArg, int srcCellRow, int srcCellCol) throws EvaluationException {
435
436
436
		ValueEval valEval = OperandResolver.getSingleValue(rangeLookupArg, srcCellRow, srcCellCol);
437
		ValueEval valEval = OperandResolver.getSingleValue(rangeLookupArg, srcCellRow, srcCellCol);
438
		if(valEval == MissingArgEval.instance) {
439
			// Tricky:
440
			// forth arg exists but is not supplied: "=VLOOKUP(A1,A2:A4,2,)"
441
			return false;
442
		}
437
		if(valEval instanceof BlankEval) {
443
		if(valEval instanceof BlankEval) {
438
			// Tricky:
444
			// Tricky:
439
			// fourth arg supplied but evaluates to blank
445
			// fourth arg supplied but evaluates to blank

Return to bug 64238