Lookup two index columns

Formula in B14:

=INDEX(Product, SUMPRODUCT(--(C10=ID_num), --(C11=OrderDate), ROW(Product)-MIN(ROW(Product))+1)) + ENTER

Alternative array formula in B15:

=INDEX(Product, MATCH(C10&"-"&C11, ID_num&"-"&OrderDate, 0)) + CTRL + SHIFT + ENTER

Alternative array formula in B16:

=INDEX(Product, MIN(IF((C10=ID_num)*(C11=OrderDate), ROW(Product)-MIN(ROW(Product))+1))) + CTRL + SHIFT + ENTER

Named ranges

ID_num (B3:B6)
OrderDate (C3:C6)
Product (D3:D6)
What is named ranges?

Download excel file for this tutorial.

Lookup two index columns.xls
(Excel 97-2003 Workbook *.xls)

Functions in this article:

MATCH(lookup_value;lookup_array; [match_type]
Returns the relative position of an item in an array that matches a specified value

INDEX(array,row_num,[column_num])
Returns a value or reference of the cell at the intersection of a particular row and column, in a given range

MIN(number1,[number2])
Returns the smallest number in a set of values. Ignores logical values and text

ROW(reference) returns the rownumber of a reference

IF(logical_test;[value_if:true];[value_if_false])
Checks whether a condition is met, and returns one value if TRUE, and another value if FALSE

SUMPRODUCT(array1;array2;)
Returns the sum of the products of the corresponding ranges or arrays

Related articles:

  • Share/Bookmark

Related posts:

  1. Lookup two index columns returning multiple matches in excel
  2. Lookup two index columns using min max values and a date range as criteria
  3. Vlookup with 2 or more lookup criteria and return multiple matches in excel
  4. Sum adjacent values using multiple lookup text values in a column in excel
  5. Merge two columns with possible blank cells in excel (formula)
  6. Create number sequences in excel 2007
  7. Count matching values in one or more columns in excel
  8. Lookup min max values within a date range in excel
  9. Lookup using two criteria in excel
  10. Sum values between two dates with criteria in excel