/** * Built-in lookup & reference functions: VLOOKUP, HLOOKUP, INDEX, MATCH, CHOOSE. * * These operate on {@link FormulaMatrix} arguments (produced by range * references). Positions are Excel **1-based**. Comparisons route through the * shared {@link compareValues} so lookup ordering matches the rest of the engine. * * @packageDocumentation */ import type { FormulaFunction } from './formula-function'; import { FunctionCategory } from './formula-function'; import type { FormulaArgument, FormulaValue } from '../types/formula.types'; /** `VLOOKUP(lookup, table, colIndex, [approx])`. */ export declare class VLookupFunction implements FormulaFunction { readonly name = "VLOOKUP"; readonly category = FunctionCategory.Lookup; readonly minArgs = 3; readonly maxArgs = 4; readonly description = "Looks up a value in the first column of a table."; evaluate(args: readonly FormulaArgument[]): FormulaValue; } /** `HLOOKUP(lookup, table, rowIndex, [approx])`. */ export declare class HLookupFunction implements FormulaFunction { readonly name = "HLOOKUP"; readonly category = FunctionCategory.Lookup; readonly minArgs = 3; readonly maxArgs = 4; readonly description = "Looks up a value in the first row of a table."; evaluate(args: readonly FormulaArgument[]): FormulaValue; } /** `INDEX(array, rowNum, [colNum])`. */ export declare class IndexFunction implements FormulaFunction { readonly name = "INDEX"; readonly category = FunctionCategory.Lookup; readonly minArgs = 2; readonly maxArgs = 3; readonly description = "Returns a value from an array by row/column position."; evaluate(args: readonly FormulaArgument[]): FormulaValue; /** Bounds-checked (1-based) element access. */ private pick; } /** `MATCH(lookup, vector, [matchType])` — 1 (asc), 0 (exact), -1 (desc). */ export declare class MatchFunction implements FormulaFunction { readonly name = "MATCH"; readonly category = FunctionCategory.Lookup; readonly minArgs = 2; readonly maxArgs = 3; readonly description = "Returns the relative position of a value in a vector."; evaluate(args: readonly FormulaArgument[]): FormulaValue; } /** `CHOOSE(index, value1, value2, …)` — returns the index-th value (1-based). */ export declare class ChooseFunction implements FormulaFunction { readonly name = "CHOOSE"; readonly category = FunctionCategory.Lookup; readonly minArgs = 2; readonly maxArgs: number; readonly description = "Returns one of a list of values by numeric index."; evaluate(args: readonly FormulaArgument[]): FormulaValue; } //# sourceMappingURL=builtins-lookup.d.ts.map