logo
search
Function Problems

Why Excel Does Not Have a Built-In Miles Function (And How to Add It)

Elise WilliamsElise Williams Sep 25, 2026 869 views

Question details

The user is attempting to calculate travel distance using a 'Miles' function they used previously, but is unable to find it in their current spreadsheet software.

Why Excel Does Not Have a Built-In Miles Function
Product
Microsoft Excel
Device & OS
not provided
Scenario
Trying to calculate driving distances or travel mileage between different cities or states directly within a spreadsheet.
Observed behavior
The '=Miles()' function is unrecognized, typically resulting in a #NAME? error, because it is not a native feature of the software.
Before you start

Before troubleshooting, note that the 'Miles' function is not a standard built-in formula. Confirm if your previous organization utilized third-party logistics add-ins (such as PC*Miler) to enable this calculation.

Solution 1Recommended

Install and Activate a Third-Party Mileage Add-in

Since the function is not native, you must install the specific third-party add-in (like PC*Miler or a custom logistics tool) that provides the distance calculation feature.

Many organizations purchase custom enterprise tools to calculate routing distances. Upgrading your Office subscription will not add this function natively.

You will need to download the installation file from the add-in provider or contact your company's IT department to request the software.

1
Open the Add-ins Menu

Launch your spreadsheet and navigate to 'File' in the top-left corner, then click on 'Options'. Select 'Add-ins' from the left-hand sidebar.

2
Locate the Mileage Tool

Review the list of 'Inactive Application Add-ins' to see if a logistics tool is already installed but disabled. If it is not listed, you must install the third-party software first.

3
Enable the Add-in

At the bottom of the window, ensure the 'Manage' dropdown is set to 'Excel Add-ins' and click 'Go'. Check the box next to your mileage add-in and click 'OK' to activate the custom Miles function.

Install and Activate a Third-Party Mileage Add-in
Add-in Compatibility: Ensure the add-in you are installing matches the bit-version (32-bit or 64-bit) of your spreadsheet application to prevent crashes.
Free Microsoft Office alternative

Try WPS Office for Your Data Analysis and Spreadsheets

While highly specialized third-party logistics add-ins like PC*Miler are required for instant mileage routing, WPS Office provides a powerful, fast, and completely free alternative for all your standard spreadsheet operations, formulas, and data management tasks.

  1. 1. Download the Installer: Visit the official WPS website to download the free installer for Windows, Mac, or Linux.
  2. 2. Run the Installation: Open the downloaded file and follow the on-screen prompts to complete the rapid installation.
  3. 3. Open Your Workbooks: Launch WPS Spreadsheets and easily open your existing Excel files to continue your data analysis without formatting loss.
Fully compatible with Microsoft Excel formats (.xls, .xlsx, .xlsm)Supports over 400 built-in functions for financial, logical, and statistical analysisLightweight installation ensures smooth performance even on older devicesFamiliar user interface makes transitioning completely seamless
microsoft office alternative - wps office

Frequently Asked Questions

Does upgrading to a higher Microsoft 365 tier add the Miles function?

No. The 'Miles' function is not a native Microsoft feature. Upgrading your subscription will not automatically provide this function; it must be installed via a third-party add-in.

Why does my cell show a #NAME? error when I type =Miles()?

The #NAME? error appears because the spreadsheet application does not recognize the function name. This confirms that the required mileage add-in is either not installed or currently disabled on your device.

Can I calculate the distance between zip codes without a paid add-in?

Yes, but it requires workarounds. You can use a VBA script combined with a free mapping API, or import web data using Power Query to scrape distances from routing websites manually.