Excel’s Dirty Little Secrets: 5 Things It Does You Don’t Expect

Nov 28, 2024 • 7 min read

Do you ever have those situations where Excel does something you just don’t expect? A lookup cannot find a number that is clearly there. A formula changes its own references. A workbook keeps returning results from a file that no longer exists.

These are the sorts of Excel features that catch us out. Sometimes they produce an obvious error. More worryingly, sometimes they return a perfectly believable number that happens to be wrong.

Here are five unexpected behaviours, why they happen, and what we need to check to keep our calculations on track.

Key Takeaways

  • Round calculated decimal lookup values to the intended precision before relying on exact matches.
  • Excel can extend formula references automatically, and the entry method can affect whether it happens.
  • Separate joined lookup criteria so different field combinations do not produce the same lookup key.
  • Check external-link freshness and named-range scope when plausible results fail to reflect changed inputs.

1. A Decimal Lookup Can Fail Even When the Numbers Appear Equal

We have lookup values in B4:B13 and corresponding letters in C4:C13. Cell E4 contains 1.3, and we want to return its matching letter, D.

This looks like a straightforward XLOOKUP:

=XLOOKUP(E4,B4:B13,C4:C13)

But instead of D, Excel returns #N/A. Apparently, it cannot find 1.3.

That is odd enough. Now compare the lookup value directly with the cell that appears to contain the same number:

=E4=B7

The result is TRUE. So Excel tells us the values are equal, but XLOOKUP still cannot find a match. What is going on?

The displayed number is not the whole story

Looking inside the workbook’s stored data reveals the difference:

  • E4: 1.3
  • B7: 1.3000000000000003
Workbook XML with callouts identifying E4 as 1.3 and B7 as 1.3000000000000003
The cells appear equal, but their stored values contain a tiny difference.

In this example, the equality comparison treats the numbers as equal at 15 significant digits. The lookup is sensitive to the difference that appears at the 17th significant digit.

The source of that tiny difference is the calculation used to build the list. Cell B4 contains 1. Each subsequent cell adds 0.1 to the cell above:

=B4+0.1

As we copy that formula down, a very small rounding difference builds up. The cell displays 1.3, but the calculated value is not exactly the same as the entered lookup value.

The fix: round the calculated values

For this list, the intended precision is one decimal place. We can make that explicit by changing the formula in B5 to:

=ROUND(B4+0.1,1)

Copy that down, and XLOOKUP returns D as expected.

When a decimal lookup cannot find a value that appears to exist, check how the lookup values were calculated. Use ROUND to bring the calculated values to the precision the data actually requires. Simply seeing the same number on screen is not enough.

2. Excel Sometimes Changes Formula References for You

Our next example has an item column, a value column, and a total in C12:

=SUM(C4:C11)

Now insert a row immediately below the data but above the total. The total moves to C13, while its formula still references C4:C11. The new blank cell, C12, is outside the sum.

Here is the unexpected part: what happens next depends on how we commit the value entered into C12.

  • Enter a number and press Ctrl+Enter: the SUM reference stays as C4:C11, so the new number is not included.
  • Enter a number and press Enter: Excel extends the SUM reference to C4:C12, including the new number.

Excel has changed the formula range by itself. The worksheet layout is the same, but the way we finish entering the value changes the outcome.

The setting that controls this behaviour

Whether this is helpful or unhelpful probably depends on what you expected Excel to do. The good news is that we can control it:

  1. Open File > Options.
  2. Select Advanced.
  3. Find Extend data range formats and formulas.
  4. Clear the checkbox to disable the behaviour, or select it to enable it.
Excel Options dialog with Advanced selected and editing option checkboxes visible

Do not assume that inserting a row above a total guarantees it will be included. Check the resulting formula reference, especially when the total changes differently from what you expected.

3. Joining Two Lookup Columns Can Create the Wrong Match

Suppose our data contains an area code, a zone, and a value. We want to find the value for area A1 and zone 1.

The area is in F4, the zone is in G4, and the source data occupies:

  • Area: B4:B19
  • Zone: C4:C19
  • Value: D4:D19

A common approach is to join the two criteria and join the two source columns:

=XLOOKUP(F4&G4,B4:B19&C4:C19,D4:D19)

We expect 71, but the formula returns 61.

Unlike an error message, that result gives us no obvious warning. It is a valid number from the return range. It just belongs to the wrong combination.

XLOOKUP is matching one combined value

The ampersand does not tell Excel to check the area and zone independently. It combines them into one text value.

Joining A1 and 1 produces A11. But joining A and 11 also produces A11.

Once joined, the original column boundaries have disappeared. XLOOKUP finds the first matching combined value and returns its result, which explains the incorrect 61.

The fix: put a separator between the fields

We need to preserve the boundary between area and zone. Add a hyphen to both sides of the lookup:

=XLOOKUP(F4&"-"&G4,B4:B19&"-"&C4:C19,D4:D19)

Now our requested combination becomes A1-1, which is different from A-11. The formula returns the correct value, 71.

Whenever you build a multi-column lookup by joining values, include a separator. Choose a character that does not appear within the source values themselves. The separator needs to distinguish the fields, not introduce another source of ambiguity.

4. External Lookups Can Keep Working from a Hidden Cache

For this example, we have two workbooks. One contains our lookup formula; the other contains the source items and values.

In C4 of the destination workbook, XLOOKUP uses the item in B4, searches B4:B11 in the source workbook, and returns the corresponding value from C4:C11.

Initially, everything works. Alpha returns 52. Changing the lookup item to Charlie or Delta also returns the expected result.

Then we close the source workbook, rename it, reopen it under its new name, and change its values:

  • Alpha: 152
  • Bravo: 145
  • Charlie: 123
  • Delta: 116

After saving and closing the renamed source file, we return to the destination workbook. Its formula still points to the old filename, which no longer exists.

Surely the lookup should fail now?

Not necessarily. Changing the lookup item from Delta to Alpha still returns a number, but it is Alpha’s old value. Changing it to Charlie also returns the old value.

Excel has saved more than the last formula result

The destination workbook contains a cache of previously linked source values. Excel can use those stored values to continue evaluating the lookup, even though the original source path is no longer valid.

This is more subtle than one cell retaining its previous answer. We can change the lookup item and get a different answer from the cached data.

To see where those values are stored, the example workbook can be inspected as a ZIP archive. Inside it, the relevant location is:

xl/externalLinks/externalLink1.xml

That XML file contains the previously linked values. It explains how Excel can still perform the lookup without finding the original source file.

When we reopen the destination workbook, Excel asks whether we want to update external links. Choosing to update exposes the problem: Excel reports that it cannot find the linked source.

A working external lookup is not proof that Excel is reading the latest source data. Pay attention to link-update prompts and confirm that the source workbook is still available at the path your formula references.

5. Copying a Worksheet Can Create a Local Named Range

Named ranges make formulas easier to read. For example, select C3 and name it Discount. Instead of referencing C3 directly, we can use that name when calculating a final price.

With the original price in C6, enter this formula in D6:

=C6*(1-Discount)

Copy it down, and the final prices calculate correctly.

Now duplicate the worksheet by holding Ctrl and dragging its sheet tab. Return to the original worksheet and change the discount to 50%.

The original worksheet’s prices update. The copied worksheet’s prices do not.

Both sets of formulas appear to use Discount. So why are they behaving differently?

The same name can exist at different scopes

Open Formulas > Name Manager. There are now two entries called Discount:

  • Workbook scope: the original named range.
  • Worksheet scope: a local named range created for the copied worksheet.
Excel Name Manager showing two Discount entries with different scopes
The name is the same, but the scope determines which discount the formula uses.

In this example, copying the worksheet containing the named cell creates a worksheet-scoped version of the name. The copied formulas use that local name, so they refer to the discount on the copied sheet rather than the original workbook-level discount.

The original name has not simply disappeared or been replaced. There are two names, and the copied sheet is using a different one from the one we intended.

The fix: check the names and update the formulas

  1. Open Name Manager after duplicating the worksheet.
  2. Check both the Scope and Refers To fields for the relevant names.
  3. Update the copied formulas to reference the intended named range.
  4. Change the original discount again to confirm that the intended prices update.

When a copied worksheet stops responding to a shared input, check named-range scope. A readable formula can still be referring to the wrong place.

Check the Behaviour, Not Just the Formula

These five examples have something in common: the formula can look perfectly reasonable while an unexpected Excel behaviour changes the result.

A decimal may contain a tiny stored difference. A total may extend only after a particular kind of entry. Joined criteria may lose their boundaries. An external lookup may use old cached data. A copied sheet may introduce a local name.

When Excel produces a surprising answer, check those assumptions as well as the formula itself. The most dangerous result is not always an error. Sometimes it is a number that looks right.

Share

Excel Off The Grid

I help you reduce repetitive Excel work with practical guides to formulas, Power Query, reporting, and automation.

© 2026 Excel Off The Grid
Powered by Convella