How to Use VLOOKUP Table Array Based on Cell Value in Excel

We are using a dataset where we stored some data on sports equipment. We have the Product IDs, Product Names, and their previous and current prices. We’ll extract various values from the table.

vlookup table array based on cell value


How to Make a VLOOKUP Table Array Based on Cell Value in Excel: 5 Simple Ways

Method 1 – Using the Excel VLOOKUP Function to Create a VLOOKUP Table Array Based on Cell Value

We want to see the Current Prices of the Products that have an ID number less than or equal to 3.

Steps:

  • Make two new columns for the chosen Product IDs and their corresponding Current Prices.
  • Insert the ID values you want to search.

  • Select cell H5 and insert the following formula in it.
=VLOOKUP(G5,$B$5:$E$11,4,FALSE)

vlookup table array based on cell value

We look up the value in G5 in the B5:E11 table_array. The absolute reference for the table_array avoids the Value not Available Error (#N/A) when copying the formula. We want to see the current price of the products, which are in the 4th column, so we chose 4 as col_index_num. We need an exact match, so we put FALSE for [range_lookup].

  • Hit the Enter button and you will see the Current Price of the Product that has the ID number 1 in cell H5.

vlookup table array based on cell value

Read More: How to Expand Table Array in Excel


Method 2 – Using the INDIRECT Function to Create a VLOOKUP Table Array Based on Cell Value

Steps:

  • Make 2 new columns for the chosen Product IDs and their corresponding Current Prices.
  • Insert the IDs you want to search.

  • Select cell H5 and insert the following formula in it.
=VLOOKUP(G5,INDIRECT("B5:E11"),4,FALSE)

vlookup table array based on cell value

The INDIRECT function makes the range B5:E11 an absolute reference for the table_array.

  • Hit the Enter button and you will see the Current Price of the Product that has the ID number 1 in cell H5.

  • Use the Fill Handle to AutoFill down.

vlookup table array based on cell value


Method 3 – Utilizing the Excel IF Function to Create a VLOOKUP Table Array

Steps:

  • Make two new columns for the chosen Product IDs and their corresponding Current Prices.
  • Insert the IDs you want to search.

  • Select cell H5 and insert the following formula in it.
=VLOOKUP(G5,IF(G5<=3,$B$5:$E$11),4,FALSE)

vlookup table array based on cell value

The IF function presents an additional check for the search ID value.

  • Hit the Enter button and you will see the Current Price of the Product that has the ID number 1 in cell H5.

  • Use the Fill Handle to AutoFill down.

vlookup table array based on cell value

Read More: How to Name a Table Array in Excel


Method 4 – Creating a VLOOKUP Array by Applying a Named Range

Steps:

  • Make two new columns for the chosen Product IDs and their corresponding current prices.
  • Select the range B5:E11 and give it a name. We chose the name ProductData.

  • Select cell H5 and insert the following formula in it.
=VLOOKUP(G5,ProductData,4,FALSE)

vlookup table array based on cell value

  • Hit the Enter button and you will see the Current Price of the Product that has the ID number 1 in cell H5.

  • Use the Fill Handle to AutoFill down.

vlookup table array based on cell value


Method 5 – Using a Table Array in a Different Sheet to Apply VLOOKUP

Steps:

  • Make two new columns for the chosen Product IDs and their corresponding previous prices in a new sheet.

  • The lookup array will come from the dataset sheet.

vlookup table array based on cell value

  • Select cell C5 and insert the following formula in it.
=VLOOKUP(B5,dataset!$B$5:$E$11,3,FALSE)

The reference for the lookup array is preceded by the sheet name and an exclamation mark, which indicates it’s in another sheet.

  • Hit Enter.

vlookup table array based on cell value

  • Use the Fill Handle to AutoFill down.


Practice Section

We have provided a practice section in the download file so you can test these methods.

vlookup table array based on cell value


Download the Practice Workbook


Related Articles


<< Go Back to Table Array in Excel | Excel VLOOKUP Function | Excel Functions | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Meraz Al Nahian
Meraz Al Nahian

Md. Meraz Al Nahian has worked with the ExcelDemy project for over 1.5 years. He wrote 140+ articles for ExcelDemy. He also solved a lot of user problems and worked on dashboards. He is interested in data analysis, advanced Excel, statistics, and dashboards. He also likes to explore various Excel and VBA applications. He completed his graduation in Electrical & Electronic Engineering from Bangladesh University of Engineering & Technology (BUET). He enjoys exploring Excel-related features to gain efficiency... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo