Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Lookup vs VLOOKUP: Which Excel Function to Use?

· 6 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

The primary difference between LOOKUP and VLOOKUP is that VLOOKUP searches for a specific value in the first column of a table and returns a value from a specified column to the right, while LOOKUP searches for a value in one row or column and returns a value from the same position in a second row or column. Use VLOOKUP for precise matches in structured tables and LOOKUP for approximate matches in sorted lists or for flexible vector-based searches.

What You'll Need

  • A spreadsheet application (Microsoft Excel, Google Sheets, or LibreOffice Calc).
  • A dataset consisting of a lookup value (the thing you know) and a table or range containing the corresponding data (the thing you want to find).
  • A basic understanding of cell references (e.g., A2, B1:C10).

Step-by-Step

  1. Prepare Your Data: Before writing either formula, ensure your data is organized. For VLOOKUP, the unique identifier (the lookup value) must be in the leftmost column of your selected range. For LOOKUP, if you are searching for an approximate match, the data in the lookup vector must be sorted in ascending order.
  2. Using VLOOKUP for Exact Matches: To find a specific piece of information, such as a price for a specific product ID, use the VLOOKUP syntax: =VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup]).
    • Select the cell where you want the result.
    • Type =VLOOKUP( and click the cell containing the value you are searching for.
    • Type a comma, then highlight the entire table range where the data resides.
    • Type a comma, then enter the column number (starting from 1 on the left) that contains the answer you need.
    • Type a comma and enter FALSE (or 0) to ensure the function only returns an exact match.
    • Close the parenthesis and press Enter.
  3. Using LOOKUP for Vector Searches: Use LOOKUP when you have two separate columns or rows that aren't necessarily part of a contiguous table. The syntax is: =LOOKUP(lookup_value, lookup_vector, result_vector).
    • Select the target cell.
    • Type =LOOKUP( and select your search value.
    • Type a comma, then highlight the single column or row where the search value is located.
    • Type a comma, then highlight the single column or row from which you want to retrieve the result.
    • Close the parenthesis and press Enter.
  4. Using LOOKUP for Approximate Range Matching: This is ideal for tax brackets or grading scales. For example, if a score of 85 should return a "B", and your table has 0=F, 70=C, 80=B, 90=A:
    • Ensure your score thresholds (0, 70, 80, 90) are sorted ascending.
    • Use =LOOKUP(85, {0,70,80,90}, {"F","C","B","A"}).
    • The function will find the largest value in the lookup vector that is less than or equal to the search value (80) and return the corresponding result ("B").
  5. Comparing the Results: Test both functions on the same dataset. Notice that VLOOKUP is rigid about the table structure (it must move left-to-right), whereas LOOKUP is more flexible regarding where the result vector is located relative to the lookup vector.

Common Mistakes

One of the most frequent errors with VLOOKUP is forgetting the [range_lookup] argument. By default, if left blank, VLOOKUP assumes TRUE (approximate match). If your data is not sorted and you omit this, Excel may return a completely incorrect value without giving you an error message, which can lead to significant data inaccuracies.

Another common mistake is trying to use VLOOKUP to look to the left. VLOOKUP can only search the leftmost column of a range and move to the right. If your unique ID is in Column C and the data you want is in Column A, VLOOKUP will fail. In these cases, users often mistakenly try to force VLOOKUP to work when they should be using LOOKUP or INDEX/MATCH.

With the LOOKUP function, the biggest mistake is ignoring the sorting requirement. Because LOOKUP uses binary search logic, it assumes the lookup vector is sorted in ascending order. If the list is unsorted, LOOKUP will often return the wrong value or a #N/A error, even if the value exists in the list.

Finally, users often confuse the col_index_num in VLOOKUP. They might count the columns of the entire spreadsheet instead of counting only the columns within the selected table_array. If your table starts at Column D and you want the second column of that table (Column E), the index number is 2, not 5.

Tips

To make your VLOOKUP formulas more resilient, use Absolute References (the dollar signs, e.g., $A$2:$B$100). This prevents the table range from shifting when you drag the formula down to fill other cells in a column.

If you are working with very large datasets, be aware that VLOOKUP can slow down your workbook. For extreme performance needs, consider using a combination of INDEX and MATCH, which is more efficient than VLOOKUP because it doesn't require the software to load the entire table array into memory.

When using LOOKUP for grading or tiers, always start your lookup vector at the lowest possible value (e.g., 0 for a 0-100 scale). This ensures that any value falling below your first threshold doesn't trigger an error, but instead returns the lowest possible tier.

For those using modern versions of Excel (Office 365), consider exploring XLOOKUP. XLOOKUP replaces both LOOKUP and VLOOKUP by allowing searches in any direction, defaulting to exact matches, and handling missing values internally without needing an IFERROR wrapper.

Troubleshooting

If your formula returns #N/A, first check for trailing spaces. A cell containing "Apple " (with a space) will not match a search for "Apple". Use the TRIM function to clean your data if this is the case.

If VLOOKUP is returning the wrong value, check the fourth argument. If it is set to TRUE or omitted, and your data isn't sorted, the result will be unpredictable. Change it to FALSE for an exact match.

If you receive a #REF! error in VLOOKUP, it means your col_index_num is larger than the number of columns in your table_array. For example, if your range is A1:B10 (2 columns) but you asked for column 3, you will get this error. Adjust the range or the index number.

If LOOKUP is returning a value that seems random, verify that your lookup vector is sorted in ascending order. If it is not, the binary search algorithm will fail. Sort your source data A-Z or Smallest to Largest and try again.

If the formula returns a 0 instead of a blank, it means the lookup was successful, but the corresponding cell in the result vector is empty. You can wrap your formula in an IF statement to display a custom message like "No Data Found" instead of 0.

Frequently Asked Questions

Can VLOOKUP look for data to the left of the search column?

No, VLOOKUP can only search the leftmost column of the specified range and return data from columns to the right. To look left, use the LOOKUP function or INDEX and MATCH.

Does LOOKUP require the data to be sorted?

Yes, for the LOOKUP function to work reliably, the lookup vector must be sorted in ascending order. If it is not sorted, the function may return an incorrect result.

What is the difference between TRUE and FALSE in VLOOKUP?

FALSE tells Excel to find an exact match; if the value isn't found, it returns #N/A. TRUE tells Excel to find the closest match that is less than or equal to the lookup value, which requires the data to be sorted.

Which function is faster for large spreadsheets?

For very large datasets, LOOKUP (and INDEX/MATCH) is generally faster than VLOOKUP because it handles vectors rather than entire table arrays, reducing the memory load.

Can I use these functions across different sheets?

Yes, you can reference other sheets by including the sheet name followed by an exclamation point in the range, such as Sheet2!A1:B10.

What happens if there are duplicate values in the lookup column?

Both VLOOKUP and LOOKUP will return the first match they encounter in the list. They cannot natively return multiple matches for a single lookup value.