Recent chats
ASKGEEZ Q&A GUIDETechnology & devices

Why do some lookup results appear correct but match the wrong inventory record?

Quick answer

A plausible but incorrect lookup result can come from a key that identifies more than one record, approximate matching when you expected an exact match, or a range and return-column selection that point to the wrong data. Check each of these before relying on the result. In Google Sheets VLOOKUP, explicitly use FALSE for exact matching; then verify that the key column and selected return column are the ones you intend. [S1]

LET’S WORK THROUGH IT

The question, the details, the next step.

Question

My inventory lookup returns a believable item description, but sometimes it belongs to a different record. How should I start auditing it?

Geez

Treat the result as unverified until you can explain how the formula selected it. Start with three separate checks: the key value, the match setting, and the lookup range. These address different failure modes, so changing the formula before inspecting the data can hide the actual problem.

For example, suppose a sheet called Inventory has item codes in column A, descriptions in B, and locations in C. A lookup on a second sheet might be intended to find the code in A2 and return its location. Write down the expected key and expected record from the source sheet, then compare them with what the lookup returned. This is an illustrative setup; use your own inventory as the reference.

Also check the key itself for differences that may be hard to notice in the displayed cell, such as an unintended space or inconsistent formatting. Confirm the actual key values in your file rather than assuming that similar-looking codes represent the same item.

Follow-up question

What should I check about exact versus approximate matching?

Geez

If you are using Google Sheets VLOOKUP and intend to find a specific item code, explicitly set its final argument to FALSE. Google Sheets uses exact matching when that argument is FALSE; if you omit it, the default is TRUE, which means approximate matching. With approximate matching, the search-key column needs ascending sort order, and a missing key can return the preceding value—an output that may look plausible while being wrong. [S1]

For the example above, the intended formula is =VLOOKUP(A2, Inventory!A:C, 3, FALSE). Here, A2 is the search key, Inventory!A:C is the range, 3 selects the third column within that range, and FALSE requests exact matching. [S1]

If your result changes after making the match setting explicit, investigate that difference before using the output. This check applies to VLOOKUP in Google Sheets; do not assume another spreadsheet program or lookup function has identical settings without checking its documentation.

Follow-up question

The formula uses FALSE already. How can the range or column choice still lead to the wrong-looking result?

Geez

Inspect the formula’s range from left to right. VLOOKUP searches the first column of the supplied range, and its column index counts from that range’s first column—not necessarily from column A in the whole sheet. It returns data from the column identified by that index. [S1]

Using Inventory!A:C with an index of 3 returns the third column of that range, C. But if the range is instead Inventory!B:D, the first searched column is B, and index 3 refers to D. A range shifted one column can therefore make a formula return a valid value from an unintended field. [S1]

Compare the formula with the table headings: does the first range column actually contain the key, and does the return index land under the intended heading? Check copied formulas too; a neighboring row may refer to a different range or use a different index. Do not trust a correct-looking description or location until you have tied it to the expected record.

Follow-up question

What if the formula and range look right? Can you give me a short audit record I can reuse?

Geez

Check whether the key appears more than once in the source data. An exact-match setting does not prove that a key uniquely identifies one inventory record. The Google Sheets guidance does not establish whether a particular inventory key is unique, so check that separately. [S1] If you find repeated keys, identify which field or combination of fields distinguishes the intended records; do not treat an arbitrary-looking result as confirmation.

Copy and fill in this audit note for a suspect result:

Lookup cell: [cell] Search key: [value] Expected record: [record or reference] Exact-match setting: [FALSE / other / unknown] Range first column: [heading] Return index and heading: [index; heading] Repeated key found: [yes / no / not checked] Next check: [action]

For instance, a hypothetical note could read: Lookup cell: E2; Search key: ZX-12; Expected record: item at location R-4; Exact-match setting: FALSE; Range first column: Item Code; Return index and heading: 3; Location; Repeated key found: not checked; Next check: inspect all source rows with code ZX-12. Replace these example values with information from your workbook. The note records what you checked; it does not by itself establish that the inventory data is correct.

A practical checklist

  • Record the lookup cell, search key, and independently expected record.

  • For Google Sheets VLOOKUP exact lookups, explicitly set the final argument to FALSE. [S1]

  • Confirm the first column of the selected range contains the key being searched. [S1]

  • Count the return-column index from the range’s first column and compare it with the intended heading. [S1]

  • Check the source data for repeated keys; exact matching does not establish that a key is unique. [S1]

  • Recheck copied formulas and record any unresolved discrepancy before relying on the result.

A few more useful answers

Does setting VLOOKUP to FALSE guarantee the correct inventory record?

No. It requests an exact match in Google Sheets, but you still need to check that the key identifies the intended record and that the range and return column are correct. [S1]

Why can an approximate-match result look reasonable but be wrong?

In Google Sheets, approximate matching requires the search-key column to be sorted in ascending order; when a key is missing, the preceding value may be returned. [S1]

Does this guidance prove my inventory codes are unique?

No. The cited Google Sheets guidance does not establish whether any particular inventory key is unique. Check for repeated keys in your own source data. [S1]

Sources

References used for this guide.

  1. [S1] VLOOKUP function in Google Sheets
    support.google.com · Checked

YOUR QUESTION. YOUR DETAILS.

Let’s work through your situation.

Get a tailored answer or help with your next task. Starts at $1, with a quote before you pay.

Ask your own question
← Back to Geez at Work