Find a customer's city with VLOOKUP
BeginnerCustomer data is often stored in a reference table that you query by ID. VLOOKUP is a quick way to pull information from that table without searching row by row.
VLOOKUP searches for a value in the first column of a table and returns a value from another column in the same row. Its syntax is:
=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])
- lookup_value: the value you want to find (the customer ID)
- table_array: the range that contains the data to search
- col_index_num: which column of the table to return (counting from the left edge of table_array)
- range_lookup: use FALSE for an exact match
Your task
The customer directory is in cells A1:D7. Below it, cell B9 contains a customer ID, and cell B10 is where you need to enter your formula.
- Click cell B10.
- Write a VLOOKUP formula that looks up the customer ID in B9 in the directory table.
- Return the city for that customer.
- Use FALSE as the last argument so Excel only matches the exact customer ID.
Need some help?
Find a customer's city with VLOOKUP
BeginnerCustomer data is often stored in a reference table that you query by ID. VLOOKUP is a quick way to pull information from that table without searching row by row.
VLOOKUP searches for a value in the first column of a table and returns a value from another column in the same row. Its syntax is:
=VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])
- lookup_value: the value you want to find (the customer ID)
- table_array: the range that contains the data to search
- col_index_num: which column of the table to return (counting from the left edge of table_array)
- range_lookup: use FALSE for an exact match
Your task
The customer directory is in cells A1:D7. Below it, cell B9 contains a customer ID, and cell B10 is where you need to enter your formula.
- Click cell B10.
- Write a VLOOKUP formula that looks up the customer ID in B9 in the directory table.
- Return the city for that customer.
- Use FALSE as the last argument so Excel only matches the exact customer ID.