Share via

Combine VLOOKUP & HLOOKUP, Multi Input, Single Output

Gano.M 20 Reputation points
2026-05-29T13:00:38.6533333+00:00

Hey,

I'm trying to create a table for the following:

I have 3 sets of Items, and each item has a different specification. Some of the specifications are the same even though they mean different things and they can't be changed.

My final table has three columns.

Column 1 (INPUT) = Item

Column 2 (INPUT) = Specification

Column 3 (OUTPUT) = Size

I need help with a formula for Column 3. Everything I've tried returns an error. I've attached a picture here to show you what I mean.

Thank you.

Microsoft 365 and Office | Excel | For home | Windows

Answer accepted by question author

AI answer

2026-05-29T13:01:07.8666667+00:00

Use a single lookup formula that combines the item and specification to return the size. A robust approach is to use INDEX with MATCH on a helper range that uniquely identifies each item/spec combination.

Assume:

  • Column A: Item (input)
  • Column B: Specification (input)
  • A lookup table somewhere else with:
    • Column F: Item
    • Column G: Specification
    • Column H: Size

Then in Column C (Size output), use:

=INDEX($H$2:$H$100,
       MATCH(1,
             ($F$2:$F$100=A2)*($G$2:$G$100=B2),
             0))

Enter this as a dynamic array formula in newer Excel, or as a legacy array formula (Ctrl+Shift+Enter) in older versions.

Explanation:

  • ($F$2:$F$100=A2) checks for matching item.
  • ($G$2:$G$100=B2) checks for matching specification.
  • Multiplying them creates a combined condition (both must be TRUE).
  • MATCH(1, …, 0) finds the row where both conditions are met.
  • INDEX returns the corresponding size.

This avoids needing to literally combine VLOOKUP and HLOOKUP and instead uses the recommended INDEX/MATCH pattern for multi-criteria lookups.


References:

AI-generated content may be incorrect. Read our transparency notes for more information.

Was this answer helpful?

1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.