You cannot add a custom ribbon tab directly inside Excel's user interface; the ribbon is controlled by the application and by Office add-ins, so the practical way to get a new ribbon is to install an add-in (from the Microsoft Store or a trusted developer) or, for advanced users, to edit the Office ribbon XML file. This guide walks through the safe, supported methods, explains what each one actually does, and covers the common mistakes and troubleshooting steps so you do not corrupt your Office installation.

What You'll Need

  • Excel for Microsoft 365, Excel 2021, 2019, or 2016 on Windows. The ribbon XML method does not work on Excel for Mac, Excel for the web, or Excel on mobile.
  • Administrator rights on your PC if you plan to edit the ribbon XML file or install an add-in for all users.
  • The add-in file (usually .xlam or .xll) or the name of the add-in in the Microsoft Store, if you are using the add-in route.
  • A backup copy of any XML file you edit, saved outside the Office folder.

Step-by-Step

  1. Decide which method you need. If you want extra buttons for a specific tool, look for an add-in first. If you want a permanent custom tab with your own macros, use the ribbon XML method. The two methods can be combined, but start with one.
  2. Install an add-in from the Microsoft Store. Open Excel, go to Insert > Get Add-ins, search for the add-in by name, and click Add. The add-in usually appears on the Home tab or creates its own tab. Labels can differ slightly by version and region, so if you do not see Get Add-ins, look for My Add-ins or Store on the Insert tab.
  3. Install a downloaded add-in (.xlam). Save the file to a folder you control, then in Excel open File > Options > Add-ins. At the bottom, set Manage to Excel Add-ins and click Go. Click Browse, select the .xlam file, tick its checkbox, and click OK. If the add-in provides a ribbon tab, it appears after Excel restarts.
  4. Back up the ribbon XML file before editing. Close Excel completely. In File Explorer, go to %APPDATA%\Microsoft\Office and open the folder for your Office version (for example Excel). If a file named Excel.officeUI exists, copy it to your Desktop as a backup. This file stores your ribbon customisations and is the file you will edit.
  5. Create or edit the ribbon XML. Open Excel.officeUI in Notepad. If the file is empty or missing, create a new text file with that exact name and the following structure: an <mso:customUI> root element containing a <mso:ribbon> element, and inside it a <mso:tabs> element. Add a <mso:tab> with an id and label, then a <mso:group> inside it, and your buttons inside the group. Each button needs an id, label, and an onAction that names a macro in your workbook or personal macro workbook.
  6. Save the file as UTF-8. In Notepad, use File > Save As, set Encoding to UTF-8, and keep the file name Excel.officeUI. Saving as ANSI or with a .txt extension will stop Excel from reading it.
  7. Restart Excel and test. Open Excel and look for your new tab. If the tab is missing, close Excel, reopen the XML file, and check that every opening tag has a matching closing tag. A single missing bracket prevents the whole ribbon from loading.
  8. Attach macros correctly. If your buttons do nothing, the macro name in onAction must match a macro that is available when the workbook opens. Store the macro in the Personal Macro Workbook (Personal.xlsb) or in the workbook that is always open, and make sure macros are enabled in the Trust Center.

Common Mistakes

  • Editing the wrong file. There may be more than one Excel.officeUI if you have multiple Office versions installed. Edit the one in the folder for the Office version you actually launch.
  • Forgetting the backup. A malformed XML file can make the ribbon fail to load entirely. Always keep a copy before editing.
  • Using the XML method on Mac. Excel for Mac does not read Excel.officeUI the same way, and the ribbon customisation options are limited. Use add-ins on Mac instead.
  • Assuming an add-in creates a tab. Many add-ins add a button to an existing tab rather than a new tab. Check the add-in's documentation before installing.
  • Macro security blocking buttons. If macros are disabled, ribbon buttons that call macros will not run even though the tab appears.

Tips

  • Test ribbon changes in a single workbook before rolling them out to a team.
  • Keep a plain-text note of your XML so you can rebuild it if the file is lost.
  • Use the Customize Ribbon options under File > Options for simple changes such as hiding tabs or adding commands to existing tabs; that route needs no XML editing.
  • If you only need quick access to a few commands, the Quick Access Toolbar is faster to set up than a custom ribbon tab.

Troubleshooting

If the ribbon does not appear at all, close Excel, restore your backup of Excel.officeUI, and reopen Excel. If Excel opens but shows a blank ribbon or an error about the custom UI, the XML is invalid; reopen the file and check for unclosed tags, missing quotation marks, or a missing xmlns declaration on the root element. If the tab appears but buttons are greyed out, the macro may be in a workbook that is not open, or macros may be disabled in Trust Center. If an add-in does not show up, check File > Options > Add-ins to confirm it is listed and ticked, then restart Excel. If you installed from the Microsoft Store, sign out and back in to your Microsoft account and check that the add-in is still listed under My Add-ins. As a last resort, uninstall the add-in or remove your custom XML, restart Excel, and confirm the default ribbon returns before trying again.

Frequently Asked Questions

Can I add a ribbon tab without editing XML?

Only through an add-in or by customising existing tabs under File > Options > Customize Ribbon. Creating a brand-new tab with your own buttons requires the XML method on Windows.

Does the ribbon XML method work on Excel for Mac?

No. The Excel.officeUI file is a Windows Office feature. On Mac, use add-ins or the built-in ribbon customisation options instead.

Will my custom ribbon sync to other computers?

No. The XML file is stored locally in your user profile. To use the same ribbon on another PC, copy the file to the same location on that PC.

Can I add buttons for macros I wrote myself?

Yes. Add a button with an onAction value that matches your macro name, and make sure the macro is stored where Excel can find it when the workbook opens.

Why did my ribbon disappear after an Office update?

Updates can reset or replace customisation files. Restore your backup copy of Excel.officeUI and restart Excel.

Is it safe to edit Office files?

It is safe if you back up first and only edit the ribbon XML file. Do not edit other Office files, and do not download ribbon files from untrusted sources.