90.0k views
4 votes
How to use vlookup and hlookup together

User MYJ World
by
7.2k points

1 Answer

2 votes

Final answer:

VLOOKUP and HLOOKUP can be used together to find data in a two-dimensional table by nesting one function inside the other. An example of this would be using VLOOKUP to find the correct row and then HLOOKUP within that row to find the correct column.

Step-by-step explanation:

VLOOKUP and HLOOKUP are functions used in Excel to search for data in a table and return the value from a specified column or row. To use VLOOKUP and HLOOKUP together, one approach is to nest one function inside the other. This technique might be necessary when dealing with a two-dimensional table where you need to look up a value both vertically and horizontally.

For example, suppose you have a table where rows represent products and columns represent months. You want to find the sales figure for a particular product in a specific month. You could first use VLOOKUP to find the product's row, and then use HLOOKUP to search for the correct month column within that row.

Here's a simplified formula that demonstrates this:
=HLOOKUP(month, data_range, VLOOKUP(product, product_range, row_index, FALSE), FALSE)

Remember that VLOOKUP looks for the lookup_value in the first column of the range and returns a value in the same row from the specified column_index_number. HLOOKUP works similarly but searches for the lookup_value in the first row and returns a value in the same column from the specified row_index_number. Ensure that the lookup_value of your HLOOKUP function is within the range returned by your VLOOKUP function.

User Drena
by
7.3k points