VLOOKUP True vs False: Which Range Lookup to Use?
In this article
The choice between TRUE and FALSE in a VLOOKUP formula determines whether Excel looks for an exact match or an approximate match. Use FALSE (or 0) when you need to find a specific, unique identifier like an ID number or email address. Use TRUE (or 1) when you are looking up a value within a range, such as assigning a letter grade based on a numeric score or calculating a tax bracket.
What You'll Need
- A spreadsheet application (Microsoft Excel, Google Sheets, or LibreOffice Calc).
- A source data table where the unique identifier or range start is in the leftmost column.
- A lookup value (the piece of data you are searching for).
Step-by-Step
- Organize Your Data: Ensure your source table is structured correctly. VLOOKUP always searches the leftmost column of your selected range. If you are using FALSE, the data can be in any order. If you are using TRUE, the leftmost column must be sorted in ascending order (A-Z or smallest to largest), otherwise the formula will return an incorrect result.
- Select Your Target Cell: Click on the cell where you want the result to appear.
- Start the Formula: Type
=VLOOKUP(. - Define the Lookup Value: Click the cell that contains the value you are searching for, or type the value in quotation marks (e.g., "Product_123"). Follow this with a comma.
- Define the Table Array: Highlight the range of cells containing your data. For example,
A2:C100. Ensure the column containing your lookup value is the first column in this selection. Follow this with a comma. - Specify the Column Index Number: Count the columns from left to right within your selected range. If the data you want to retrieve is in the third column of your selection, type
3. Follow this with a comma. - Choose the Range Lookup (True vs False):
- For an Exact Match: Type
FALSE. This tells Excel to find the exact value you specified. If the value does not exist in the first column, Excel will return a #N/A error. - For an Approximate Match: Type
TRUE. This tells Excel to find the largest value that is less than or equal to your lookup value. This is ideal for tiered data.
- For an Exact Match: Type
- Close and Execute: Type the closing parenthesis
)and press Enter.
Common Mistakes
One of the most frequent errors is omitting the fourth argument entirely. In most spreadsheet software, if you leave the range_lookup blank, the system defaults to TRUE. If you intended to find an exact match (which is the case for most business users), your formula will return a result, but it might be the wrong one because it is simply finding the closest match it can. Always explicitly type FALSE if you need an exact match.
Another common mistake is ignoring the sorting requirement for TRUE lookups. When using TRUE, the formula stops searching as soon as it encounters a value larger than your lookup value. If your list is not sorted ascendingly, the formula may stop prematurely or skip over the correct range entirely, leading to logically incorrect data retrieval.
Users also frequently forget that VLOOKUP cannot look to the left. If your unique identifier is in Column B and the data you want to retrieve is in Column A, VLOOKUP will not work regardless of whether you use TRUE or FALSE. You would need to move the identifier column to the left or use a combination of INDEX and MATCH.
Tips
To make your formulas cleaner, you can use numbers instead of words for the fourth argument. In Excel and Google Sheets, 0 is equivalent to FALSE and 1 is equivalent to TRUE. Typing =VLOOKUP(A2, D2:F10, 2, 0) is faster and more common among power users than typing the full word FALSE.
When working with large datasets, use absolute references (dollar signs) for your table array. For example, instead of A2:C100, use $A$2:$C$100. This allows you to drag the formula down a column without the search range shifting downward, which would otherwise cause you to miss data at the top of your table.
If you are using an approximate match (TRUE) for tax brackets or commissions, always start your lookup table at the lowest possible value (e.g., 0). This ensures that any value lower than your first tier is still captured and doesn't result in an error.
Troubleshooting
If your VLOOKUP returns #N/A while using FALSE, it means the exact value was not found. First, check for leading or trailing spaces in your cells. A cell containing "Apple " (with a space) is not the same as "Apple". You can fix this by using the TRIM function on your data. Next, verify that the data types match; if your lookup value is stored as text but the table contains numbers, the match will fail.
If your VLOOKUP returns the wrong value while using TRUE, the first thing to check is your sorting. Highlight the leftmost column of your table array and use the Sort A-Z function. If the data is not sorted, the approximate match logic breaks. If it is sorted and still wrong, check that your lookup value isn't smaller than the smallest value in your table.
If the formula returns #REF!, you have likely entered a column index number that is larger than the number of columns in your selected range. For example, if your table array is A2:B10 (2 columns) but your index number is 3, Excel cannot find a third column to pull data from.
Frequently Asked Questions
What happens if I leave the last part of the VLOOKUP formula empty?
If you omit the range_lookup argument, the spreadsheet defaults to TRUE. This means it will look for an approximate match, which can lead to incorrect results if you were expecting an exact match.
Can I use VLOOKUP for case-sensitive searches?
No, VLOOKUP is not case-sensitive. Whether you use TRUE or FALSE, "APPLE" and "apple" are treated as the same value. For case-sensitive searches, you must use a combination of the EXACT function and INDEX/MATCH.
Why does TRUE work for grades but not for employee IDs?
Employee IDs are unique identifiers where only one specific match is correct. Grades are based on ranges (e.g., 80-89 is a B). TRUE is designed to find where a value falls within a boundary, whereas FALSE is designed to find a specific needle in a haystack.
Is there a better alternative to VLOOKUP for exact matches?
Yes, XLOOKUP is a newer function available in Microsoft 365 and Google Sheets. XLOOKUP defaults to an exact match, meaning you don't have to specify TRUE or FALSE, and it can look both left and right.
Does the TRUE lookup find the closest value or the next lowest?
The TRUE lookup finds the largest value that is less than or equal to the lookup value. It does not necessarily find the "closest" number; it finds the floor of that value within the sorted list.