WP Workflow Picks
excelmacrosnamed ranges

Excel 4.0 Function Stored in Defined Names: What It Means and Fixes

Why Excel warns about an Excel 4.0 function stored in defined names when you save as .xlsx, how to find the names behind it, and the three ways to fix it.

WP Workflow Picks team · · 6 min read · 9 sources
Churchill Club Top 10 Tech Tech Trends Debate 2013 — I chose Deep Learning / Machine Learning
Photo: jurvetson (CC BY 2.0) via Openverse

The message “Excel 4.0 function stored in defined names” means your workbook has at least one named formula that uses a legacy Excel 4.0 (XLM) macro function such as GET.CELL, GET.WORKBOOK, EVALUATE or LINKS, and Excel will not keep it in a macro-free .xlsx file. You fix it by either saving as a macro-enabled format (.xlsm or .xlsb) or finding and removing the offending names, which are sometimes hidden or created by an add-in.

Below is what triggers the warning, how to track down the names, and how to pick the right fix.

Where the warning shows up

You usually see it when you save. Excel shows a dialog that starts with “The following features cannot be saved in macro-free workbooks” and lists “Excel 4.0 function stored in defined names” as the feature it will lose. The same dialog appears for other macro content too; in some threads, the listed feature is a VBA project instead.

It is triggered by the file format, not by anything being “wrong” with the workbook. As Excel Off The Grid explains, any file containing an Excel 4 macro function has to be saved as a macro-enabled workbook, and trying to save it as a standard .xlsx raises this error.

Why these functions live in defined names

Excel 4.0 macro functions predate VBA. Most of them cannot be typed directly into a cell the way SUM or XLOOKUP can. The workaround tutorials have used for years is to put the function inside a defined name (Formulas > Name Manager > New) and then use that name in cells.

Common examples:

FunctionTypical use in a named formula
GET.WORKBOOKBuild a live list of sheet names
GET.CELLRead a cell’s formatting, such as its fill color or number format
EVALUATECalculate a formula stored as text
LINKSList external workbook links

Office Watch notes that GET.WORKBOOK can’t be saved in a macro-free .xlsx workbook, and that these functions only work in Excel for Windows; Excel for Mac, Excel for the web and the mobile apps show #NAME errors instead.

Step 1: Find the names causing it

Start with the names you can see.

  1. Go to Formulas > Name Manager.
  2. Widen the Refers To column, or click a name and read the box at the bottom.
  3. Look for formulas containing GET., EVALUATE(, LINKS(, FILES( or other functions you don’t recognize as normal worksheet functions.
  4. Write down each name and check where it’s used (Ctrl+F, search for the name, set Look in to Formulas) before you change anything.

If Name Manager shows nothing suspicious

The names may be hidden. Microsoft’s Name Manager documentation says it does not display hidden names, meaning names whose Visible property is set to False. Add-ins and older templates often create them.

To reveal them on a copy of the file:

  1. Save a backup of the workbook.
  2. Press Alt+F11 to open the VBA editor, then Insert > Module.
  3. Paste and run a short loop like this (the approach described by ExcelDemy):
Sub ShowAllNames()
    Dim nm As Name
    For Each nm In ActiveWorkbook.Names
        nm.Visible = True
    Next nm
End Sub
  1. Reopen Name Manager. The hidden names now appear and you can inspect them.

Adding a module makes the workbook macro-containing, so delete the module after you’re done if your goal is a clean .xlsx. Also be aware that some hidden names belong to add-ins or Excel features, so only remove the ones you’ve identified as the XLM culprits.

A non-VBA option: make a copy of the .xlsx/.xlsm, rename it to .zip, and open xl/workbook.xml. The definedNames section lists every name and what it refers to, hidden or not.

Check your add-ins and data sources

If the names keep coming back, something is adding them. Two documented cases:

  • MySQL for Excel. A MySQL bug report describes this exact warning appearing on close even when the user added no formulas. The add-in created defined names with these functions to handle internationalization. The report says version 1.3.2 changed this so the formulas are removed before saving and restored afterward.
  • QuickBooks exports. In a QuickBooks community thread, users exporting reports to Excel found names defined by QuickBooks in Name Manager that triggered the same message.

To test, go to File > Options > Add-ins, pick COM Add-ins in the Manage box, click Go, and temporarily untick add-ins one at a time. If the warning stops, update or reconfigure that add-in rather than deleting its names by hand.

Step 2: Choose a fix

OptionWhen to use itTrade-off
Save as .xlsm or .xlsbYou need the named formula (e.g. a sheet list or color-based totals)Macro-enabled files may be blocked by email filters or company policy
Delete or rewrite the names, then save as .xlsxThe names are leftovers, or you can replace them with modern formulasAny formulas using those names will break until updated
Remove or update the add-inThe names are created by an add-in or exportThe add-in may need them while it’s running

Keep the functions: save as macro-enabled

  1. Go to File > Save As.
  2. In the file type list, choose Excel Macro-Enabled Workbook (*.xlsm) or Excel Binary Workbook (*.xlsb).
  3. Save, and use that file from now on.

Office Watch points out the catch: in organizations where macro-enabled Office documents are restricted or blocked for security reasons, an .xlsm file may not get through.

If you’re saving from VBA, a forum report notes that calling Save on a workbook with the wrong extension can still trigger the warning; use SaveAs with an explicit macro-enabled file format instead.

Remove the functions: go back to .xlsx

  1. In Name Manager, select the XLM-based name.
  2. Replace its formula with a modern equivalent if one exists, or click Delete.
  3. Fix any cells that showed #NAME? afterward.
  4. Save as .xlsx. The warning should no longer appear.

Some modern replacements exist for common uses. For example, Exceljet shows =TEXTAFTER(CELL("filename",A1),"]") to get the current sheet name in Excel 365. Microsoft notes that CELL("filename") returns empty text until the file has been saved and isn’t supported in Excel for the web. There is no single built-in replacement for everything GET.CELL or GET.WORKBOOK can do, so some uses need VBA, Power Query or a different design.

What about macro security settings?

This is a separate issue from the save warning, but it affects whether XLM content runs at all. Microsoft now disables Excel 4.0 (XLM) macros by default. Its Tech Community post describes a dedicated checkbox so XLM behavior can be set separately from VBA, and admins can block XLM entirely through policy.

Per Microsoft’s Working with Excel 4.0 macros page, the setting is at File > Options > Trust Center > Trust Center Settings > Macro Settings, via the option Enable Excel 4.0 macros when VBA macros are enabled. When it’s unchecked, XLM macros are disabled without notification. Microsoft recommends migrating XLM macros to VBA and advises against “Enable all macros.”

Our sources don’t spell out whether this setting affects XLM functions used only inside defined names in the same way it affects classic macro sheets, so if you depend on such names, test the workbook on the machines and policy setup your team actually uses. Settings and defaults are as of October 2026 and may change with Microsoft 365 updates.

Quick checklist

  • Warning on save = an XLM function sits in a defined name.
  • Check Name Manager, then hidden names, then add-ins.
  • Need the feature? Save as .xlsm or .xlsb.
  • Don’t need it? Delete or replace the name and save as .xlsx.
  • Sharing with Mac or web users? Avoid XLM names entirely.

Frequently asked questions

Can I just click Yes and save as .xlsx anyway? +

You can, but forum reports say the names that use Excel 4.0 functions are dropped or stop working, so any formulas that rely on them can break. Save a copy as .xlsm first if you are not sure what those names do.

Why do I get this warning when I never wrote any macros? +

The names are often added by something else: an add-in, a template, a file exported from another program, or a formula copied from a tutorial. The MySQL for Excel add-in and QuickBooks report exports are documented examples.

Do GET.CELL and GET.WORKBOOK names work on Mac or in Excel for the web? +

Office Watch reports that these legacy functions work only in Excel for Windows, and other versions show #NAME errors instead. If your workbook is shared across platforms, a modern formula or a different approach is safer.

Will the Trust Center macro setting stop these names from working? +

Microsoft now disables Excel 4.0 (XLM) macros by default and offers a separate checkbox to enable them. Our sources do not clearly confirm how that setting treats XLM functions inside defined names versus classic macro sheets, so test the file on the machines that will use it.

Sources

  1. Working with Excel 4.0 macros (Microsoft Support) (support.microsoft.com)
  2. Use the Name Manager in Excel (Microsoft Support) (support.microsoft.com)
  3. Restrict usage of Excel 4.0 (XLM) macros with new macro settings control (Microsoft Tech Community) (techcommunity.microsoft.com)
  4. Using Excel 4 macro functions (Excel Off The Grid) (exceloffthegrid.com)
  5. Automatic worksheet tabs list in Excel (Office Watch) (office-watch.com)
  6. MySQL Bugs #73467: Warning about macro-free workbooks when closing & saving an Excel workbook (bugs.mysql.com)
  7. Trouble with 'Excel 4.0 function stored in defined names' error (Excel Forum) (excelforum.com)
  8. Excel names not in Name Manager (ExcelDemy) (exceldemy.com)
  9. Get sheet name only (Exceljet) (exceljet.net)
About this guide. Researched and drafted with AI assistance from the sources above, then checked against our editorial rules. It reflects what was publicly known on October 26, 2026; details can change, so confirm with the official source before acting on it. How we work →

Our reviews

In-depth reviews from Workflow Picks that go with this topic.

Keep reading