To find links in an Excel spreadsheet, press Ctrl+F, search for a visible URL or the word HYPERLINK, and use Find All; this can locate displayed addresses and hyperlink formulas, but it will not reveal every link hidden behind friendly text. For a complete inventory of clickable cell links, use the VBA method below. These steps are for Excel for Microsoft 365 on Windows.
What You’ll Need
- The workbook you want to inspect. If it is important, save a separate copy before running a macro.
- Excel for Microsoft 365 on Windows for the VBA inventory method. You can still use the manual search steps in Excel for Mac and Excel for the web, though menus and shortcuts can differ.
- Permission to enable or run macros if you choose the automated method. Do not enable macros in a workbook you do not trust.
Step-by-Step
- Open the workbook and decide what kind of link you are looking for. A link might be a URL displayed in a cell, a hyperlink whose clickable text is something like “Open report,” a formula using Excel’s HYPERLINK function, or a link attached to a shape or picture. These are not all found in the same way. If you know the website, file name, or link text, keep a distinctive part of it handy for searching.
- Search for URLs or text that appears in cells. Press Ctrl+F, enter a distinctive word, file name, or portion of the web address, and select Find All. If the results list appears, select a result to jump to that cell. Search for a short, unique part rather than a full URL if the address may contain extra tracking details or punctuation. On Mac, use Command+F. In Excel for the web, use the search box or Ctrl+F in the browser; browser shortcuts can sometimes take priority, so use Excel’s search control if needed.
- Expand the Find options and set the search scope. In the Windows Find dialog, select Options if the additional settings are hidden. Set Within to Sheet to search the current worksheet, or Workbook to search all worksheets. Choose Look in: Values when you are looking for text users can see in cells. Choose Look in: Formulas when you want to search the formula text instead. Find All is useful for collecting several matches; Find Next is better for checking one result at a time. Review the sheet name and cell reference shown with each result.
- Search for HYPERLINK formulas separately. In the Find dialog, search for HYPERLINK and set Look in to Formulas. Select Find All to list cells whose formulas contain that function. A formula may build its destination from other cells, so finding the formula identifies where the clickable link is but may not show the final address in the result list. Select the cell and inspect the formula bar to see the formula and any cell references it uses. A link can also be created through Excel’s Insert Link feature without a HYPERLINK formula, so this search alone is not a full inventory.
- Inspect a suspected hyperlink without following it. Select its cell and look at Excel’s status bar or hover over the link, if Excel displays a destination preview. For a clearer check, right-click the cell and choose Edit Hyperlink. The dialog shows the address or document location. Review it, then select Cancel if you do not intend to change anything. Selecting the cell normally does not open the link; clicking the linked text may. Be especially careful with links to unknown websites or files.
- Check for links attached to pictures or shapes. Click a picture, icon, or shape once to select it, then right-click and look for Edit Link or Edit Hyperlink in the context menu. If available, open that command to inspect the destination and cancel when finished. Shape links are separate from ordinary cell contents, so a cell search may not find them. Avoid choosing a command that opens the destination while you are auditing.
- Use a macro when you need a workbook-wide list of cell links. First save a copy of the workbook. Press Alt+F11 to open the Visual Basic Editor, choose Insert > Module, and paste the code below into the module. Return to Excel, press Alt+F8, select ListWorkbookLinks, and choose Run. The macro creates a worksheet named Link Inventory and records cell hyperlinks plus cells whose formulas contain HYPERLINK. If that sheet already exists, the macro deletes and recreates it, so preserve any information on a sheet with that name before running the code.
Sub ListWorkbookLinks()
Dim wb As Workbook
Dim ws As Worksheet
Dim outWs As Worksheet
Dim linkItem As Hyperlink
Dim target As Range
Dim formulaCells As Range
Dim cell As Range
Dim nextRow As Long
Set wb = ThisWorkbook
Application.DisplayAlerts = False
On Error Resume Next
wb.Worksheets("Link Inventory").Delete
On Error GoTo 0
Application.DisplayAlerts = True
Set outWs = wb.Worksheets.Add(After:=wb.Worksheets(wb.Worksheets.Count))
outWs.Name = "Link Inventory"
outWs.Range("A1:E1").Value = Array("Source sheet", "Cell", "Display text", "Address", "SubAddress")
nextRow = 2
For Each ws In wb.Worksheets
If ws.Name = outWs.Name Then GoTo NextSheet
For Each linkItem In ws.Hyperlinks
Set target = Nothing
On Error Resume Next
Set target = linkItem.Range
On Error GoTo 0
If Not target Is Nothing Then
outWs.Cells(nextRow, 1).Value = ws.Name
outWs.Cells(nextRow, 2).Value = target.Address(False, False)
outWs.Cells(nextRow, 3).Value = target.Text
outWs.Cells(nextRow, 4).Value = linkItem.Address
outWs.Cells(nextRow, 5).Value = linkItem.SubAddress
nextRow = nextRow + 1
End If
Next linkItem
Set formulaCells = Nothing
On Error Resume Next
Set formulaCells = ws.UsedRange.SpecialCells(xlCellTypeFormulas)
On Error GoTo 0
If Not formulaCells Is Nothing Then
For Each cell In formulaCells
If InStr(1, cell.Formula, "HYPERLINK(", vbTextCompare) > 0 Then
outWs.Cells(nextRow, 1).Value = ws.Name
outWs.Cells(nextRow, 2).Value = cell.Address(False, False)
outWs.Cells(nextRow, 3).Value = cell.Text
outWs.Cells(nextRow, 4).Value = "Formula link"
outWs.Cells(nextRow, 5).Value = cell.Formula
nextRow = nextRow + 1
End If
Next cell
End If
NextSheet:
Next ws
outWs.Columns("A:E").AutoFit
End Sub
The macro is a practical inventory, not a guarantee that every clickable object will appear: links attached to shapes may not have a cell range to report, and a HYPERLINK formula can appear both in the hyperlink list and formula list. It does not open any destinations. On Mac, the Visual Basic Editor shortcut is usually Option+F11 or Fn+Option+F11, depending on the keyboard; use Tools > Macro > Visual Basic Editor or the Developer tab if the shortcut differs. Excel for the web cannot run VBA, so open the file in desktop Excel to use this method.
Common Mistakes
- Assuming the visible text is the destination. A cell reading “Customer portal” may link to a long web address or an internal worksheet. Inspect the hyperlink rather than relying on the label.
- Searching only values. A HYPERLINK formula may contain its destination in the formula rather than in the displayed value. Search formulas as well as values when you are investigating a workbook.
- Searching only the active sheet. If the workbook has multiple tabs, change Within to Workbook or repeat the search on each sheet.
- Confusing other references with hyperlinks. A formula that refers to another workbook or worksheet is not necessarily a clickable hyperlink. Likewise, a URL written in a cell is not always an active link.
- Clicking a suspicious link to inspect it. Opening a web page or file is not necessary to see its destination. Use Edit Hyperlink or the inventory instead.
- Assuming Go To Special finds cell hyperlinks. Go To Special has useful selection options, but its Objects option targets items such as shapes, not a dependable list of hyperlink cells.
Tips
- Search for distinctive fragments. A domain such as example.com is usually easier to find than a complete URL that may vary slightly between cells.
- Use Find All, then sort or filter the results mentally by sheet and cell reference. Record the locations you need to review before editing anything.
- When checking a cell manually, right-click and choose Edit Hyperlink rather than clicking the link. Cancel the dialog to leave the workbook unchanged.
- For internal links, check both the Address and SubAddress fields. An internal link may use a blank web address and identify a sheet or cell through its subaddress.
- After using the macro, review Link Inventory for duplicate entries and check shapes separately. Save the workbook after deciding whether you want to retain the inventory tab.
- On Mac, Excel uses Command+F for Find and generally supports the same search idea, though dialog layouts and VBA shortcuts can differ. Excel for the web supports manual searching but not VBA macros.
Troubleshooting
Find reports no results, but you can see a link. Expand Options, check whether Within is set to Workbook or Sheet as intended, and switch Look in between Values and Formulas. If the link has friendly text, search for that displayed text; the destination itself may not be stored as visible cell text. Also check whether a filter or hidden worksheet is keeping you from noticing the relevant result.
The link opens when you try to inspect it. Cancel out of the destination or close the browser or file without making changes. Next time, select the cell and use the right-click Edit Hyperlink command, or generate an inventory. Avoid testing unknown destinations on a computer where you do not want them opened.
The macro is blocked or Alt+F8 shows no macro. Confirm that the code is in a standard module in the workbook you intend to inspect, and that macros are permitted by your organization’s security settings. If the workbook is saved as .xlsx, VBA code will not be retained in that file; save a macro-enabled copy as .xlsm if you need to keep the code. Do not change security settings to run code from an untrusted source.
The inventory omits a link or creates duplicates. Shape links may not be associated with a cell range, so inspect pictures and shapes manually. A formula-based link may also be recorded once as a hyperlink and again as a HYPERLINK formula. Use the sheet and cell columns to identify duplicate locations, and treat the inventory as a starting point rather than proof that every object has been checked.
Edit Hyperlink is missing. The selected item may not be a hyperlink, or you may have selected a shape, merged range, or a cell containing plain text. Try selecting the exact cell or object and inspect its context menu. A URL typed as text may need to be converted to a hyperlink before Excel offers editing controls.
Frequently Asked Questions
Can I find every hyperlink with Ctrl+F?
Not reliably. Ctrl+F finds matching text or formula content, not every hyperlink as a special object. It can find visible addresses and HYPERLINK formulas when configured appropriately, but links behind friendly text may require inspection or a macro inventory.
How do I find links across all sheets?
Press Ctrl+F, select Options, set Within to Workbook, and choose Find All. Search for the displayed label or an address fragment. To inspect links that do not expose their address in the cell text, use Edit Hyperlink or the VBA inventory.
How can I tell where a hyperlink goes without opening it?
Right-click the linked cell and choose Edit Hyperlink to view its address or subaddress, then cancel. You can also use a destination preview if Excel displays one when you hover over the link.
Does the macro find links on pictures and shapes?
It is designed to list hyperlinks associated with cells and HYPERLINK formulas. A shape or picture link may not have a cell range and can be omitted. Select each suspected object and check its context menu for Edit Link or Edit Hyperlink.
Can I use these steps in Excel for the web?
You can search manually in the web app, but VBA does not run there. For the workbook-wide macro inventory, open the file in desktop Excel for Windows or Mac. Menu placement and shortcuts can vary between the web and desktop apps.
Will finding a link change my workbook?
Searching and opening Edit Hyperlink without saving changes should not alter a link. The macro adds a Link Inventory worksheet and replaces an existing sheet with that exact name, so save a copy first and review that sheet before running it.
Related
- How to Enable Merge Cells in Excel
- How to Enable Paste Special in Excel
- How to Enable Freeze Panes in Excel
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- How to Mail Merge in Word: A Complete Step-by-Step GuideTo mail merge in Word, prepare a recipient list—usually an Excel workbook—then use the Mailings tab to connect…
- Free Excel Meal Plan Template: Build a Weekly PlannerYes—free Excel meal plan templates are available, and you can also build a simple weekly planner in a…
- Excel Blue Line Print Area: What It MeansIn Excel, blue lines in Page Break Preview mark page breaks—the boundaries between printed pages—not necessarily the edge…
- Excel and Google Sheets Templates: Uses and ChoicesExcel and Google Sheets templates are prebuilt spreadsheets you can copy and adapt for tasks such as budgeting,…
- Print Freeze Panes in Excel: Repeat Rows on Every PageTo print frozen rows or columns on every page in Excel, use Page Layout > Print Titles and…
- Camping Meal Planner Spreadsheet: Plan Meals and Pack FoodA camping meal planner spreadsheet helps you map meals to each day, estimate how much food to bring,…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.