LOOKUP Function
Master the LOOKUP function with practical examples and error solutions. Learn how to search arrays and return values efficiently in Excel and Sheets.
=LOOKUP(lookup_value, lookup_vector, [result_vector])Quick Answer
LOOKUP function LOOKUP function searches a sorted one-dimensional array and returns a corresponding value in Excel and Google Sheets. Syntax: `=LOOKUP(lookup_value, lookup_vector, [result_vector])`.
=LOOKUP(lookup_value, lookup_vector, [result_vector])- Saves 60% time on sorted list searches
Practical Examples
Basic Price Lookup
Find product price based on quantity ordered
Commission Rate Calculation
Determine sales commission percentage based on monthly sales amount
Grade Assignment System
Convert numerical test scores to letter grades using ranges
Tax Bracket Calculation
Determine tax rate based on income level
Shipping Cost Determination
Calculate shipping cost based on order weight
Employee Bonus Tier Lookup
Assign bonus amounts based on performance scores
Common Errors and Solutions
LOOKUP cannot find a value
The lookup_value is smaller than the smallest value in the lookup_vector, or the lookup_vector is not sorted in ascending order.
1. Verify that lookup_vector is sorted in ascending order (smallest to largest) 2. Check if your lookup_value is within the range of values in lookup_vector 3. Ensure there are no blank cells at the beginning of lookup_vector 4. If data cannot be sorted, consider using INDEX/MATCH with exact match instead
Always sort your lookup_vector in ascending order before using LOOKUP. Use data validation to ensure new entries maintain sort order.
Example:
Invalid reference in LOOKUP formula
The lookup_vector or result_vector references cells or ranges that have been deleted, or the two vectors are different sizes.
1. Verify that both lookup_vector and result_vector still exist and haven't been deleted 2. Ensure lookup_vector and result_vector are the same size (same number of rows or columns) 3. Check that both ranges are either both rows or both columns (not mixed) 4. Use named ranges to prevent reference errors when rows/columns are inserted or deleted 5. Rebuild the formula if references cannot be recovered
Use structured references or named ranges instead of cell references. Before deleting rows or columns, check for LOOKUP formulas that might reference them.
Example:
Wrong value type in LOOKUP
The lookup_vector contains non-numeric values when searching for a number, or contains mixed data types that prevent proper sorting.
1. Ensure data types are consistent in lookup_vector (all numbers or all text, not mixed) 2. Use VALUE() function to convert text numbers to actual numbers: =LOOKUP(A2, VALUE(B:B), C:C) 3. Remove or replace any error values in the lookup_vector 4. Check for hidden characters or spaces that might affect data type recognition 5. Verify that lookup_value matches the data type in lookup_vector
Maintain consistent data types in your lookup ranges. Use data validation to restrict input types. Apply proper number or text formatting to columns.
Example:
LOOKUP returns incorrect or unexpected value
The lookup_vector is not sorted in ascending order, or LOOKUP performed an approximate match when exact match was expected.
1. Sort lookup_vector in ascending order (A-Z for text, smallest to largest for numbers) 2. Remember that LOOKUP always does approximate matching - it finds the largest value ≤ lookup_value 3. If you need exact matches, use VLOOKUP with FALSE or INDEX/MATCH instead 4. Check for duplicate values in lookup_vector that might cause ambiguous results 5. Verify there are no blank cells in the middle of your lookup_vector
Always sort data before using LOOKUP. Document that LOOKUP is being used for approximate matches. Consider VLOOKUP or XLOOKUP if exact matches are required.
Example:
Best Practices and Advanced Tips
Always Sort Your Data
LOOKUP requires the lookup_vector to be sorted in ascending order for accurate results. Before using LOOKUP, select your lookup range and use Sort A-Z (or Sort Smallest to Largest for numbers). Unsorted data will produce incorrect results without warning.
Use Named Ranges for Maintainability
Instead of using cell references like A2:A10, create named ranges for your lookup and result vectors. This makes formulas easier to read, prevents reference errors when inserting rows, and allows for easier updates to range sizes.
LOOKUP Always Does Approximate Matching
Unlike VLOOKUP which can do exact or approximate matches, LOOKUP always performs approximate matching. It finds the largest value that is less than or equal to your lookup value. If you need exact matches, use VLOOKUP with FALSE parameter or INDEX/MATCH combination instead.
Performance with Large Datasets
For datasets with more than 10,000 rows, LOOKUP performs very efficiently on sorted data due to its optimized search algorithm. However, if your data is unsorted or requires exact matching, INDEX/MATCH or XLOOKUP will be more appropriate choices.
Combine with IFERROR for Robust Formulas
Wrap LOOKUP in IFERROR to handle cases where the lookup value is outside the range of your lookup_vector. This provides a graceful fallback value instead of displaying an error, making your spreadsheets more user-friendly and professional.
Platform Compatibility
LOOKUP works identically in Excel (all versions from Excel 97 onwards) and Google Sheets. This makes it an excellent choice for spreadsheets that need to be shared across platforms or organizations using different tools.
Need Help with LOOKUP Function?
Stop struggling with formula syntax. Use AskFormulas to generate validated formulas instantly with our AI-powered tool.
Example Excel formula:
Related Formulas
Learn HLOOKUP to search horizontally and return values. Complete guide with examples, syntax, and solutions for Excel and Google Sheets.
Master INDEX to retrieve values from specific positions in arrays. Learn array manipulation with practical examples and solutions.
Find value positions in Excel/Sheets with MATCH. Learn syntax, examples, errors, and combine with INDEX for powerful lookups.
Master the VLOOKUP function with practical examples and error solutions. Learn how to search and retrieve data efficiently in Excel and Google Sheets.