Fix Excel Adding File Paths to Same-Workbook Cell References
Question details
The user wants to know why Excel is adding full SharePoint or local file paths to internal cell references (e.g., =Sheet2!B6) and how to restore them to simple links.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Creating or editing formulas within a workbook that is synced to SharePoint or OneDrive.
- Observed behavior
- Excel replaces or generates internal cell references with full external file paths instead of simple sheet references, complicating the formulas.
Ensure your internet connection is stable if you are working on a shared SharePoint or OneDrive workbook, and verify that the file is not currently being edited by another user.
Remove File Paths Using Find and Replace
A quick method to clean up existing formulas by replacing the unwanted file path string with nothing.
When Excel forces absolute paths into your internal references, the easiest way to clean them up in bulk is by utilizing the built-in Find and Replace feature. This allows you to strip the unwanted SharePoint URL or local drive path without breaking the actual cell calculation.
Highlight the cells containing the affected formulas, or press Ctrl + A to select the entire worksheet.
Press Ctrl + H on your keyboard to open the Find and Replace dialog box.
In the 'Find what' field, carefully paste the exact file path (e.g., the SharePoint URL or local C: drive path) that Excel unexpectedly added.
Leave the 'Replace with' field completely empty, then click 'Replace All' to strip the file path and restore simple workbook references like =Sheet2!B6.

Download and Edit the Workbook Locally
Bypasses SharePoint or OneDrive live-sync issues by working on a local, unlinked copy of the workbook.
Experience Glitch-Free Spreadsheets with WPS Office
If Excel's integration with SharePoint continues to corrupt your internal formula references, consider switching to WPS Office. It provides a lightweight, highly compatible alternative for managing your spreadsheets seamlessly without unexpected file path injections.
- 1. Download WPS Office: Visit the official WPS website and download the free version of WPS Office to your computer.
- 2. Install the Software: Run the installer and follow the simple on-screen instructions to complete the setup.
- 3. Open Your Workbook: Launch WPS Spreadsheet and open your existing .xlsx files directly. You can now edit formulas without unwanted file path additions.

Frequently Asked Questions
Why does Excel add SharePoint paths to my formulas?
This typically happens when a workbook is opened from a synced cloud location (like OneDrive or SharePoint). Excel sometimes struggles to resolve the local relative path in a live-sync environment, defaulting to the absolute URL instead to prevent broken links.
Will using Find and Replace to delete the path break my existing formulas?
No. As long as you only remove the external file path prefix (such as the https:// link or the C:\ folder path) and leave the sheet name and cell reference intact, the formula will correctly recalculate using the internal data.
Can I prevent Excel from using absolute paths for local links in the future?
While it can be a persistent bug with cloud files, you can often prevent it by ensuring you edit complex synced files in the desktop app rather than the web app, or by temporarily pausing OneDrive sync while creating new formulas.




