5 Ways To Find a Link in Microsoft Excel

Today, you’ll learn how to find a link in Microsoft Excel in simple ways.

If you’ve ever worked with a large Excel file and needed to track down one or a few links, whether it’s a hyperlink, a formula reference, or a path to another file, you know it’s not as simple as it sounds.

I’ve run into this problem more times than I can count, and I know how frustrating it can get. That’s why I put together this simple Excel guide to track links.

If you follow along with this guide, you’ll learn clear and reliable ways to find any link in your workbook. Let’s get started!

Using the Find and Replace Tool

One of the simplest and fastest ways to find links in Excel is by using the Find and Replace tool. This built-in feature can search through formulas, values, and even text within hyperlinks.

Find and Replace tool interface
Find and Replace tool interface

This method is especially helpful when you’re dealing with large datasets or inherited files where you’re not sure what’s embedded in which cell. Let me walk you through the steps below:

Open Find and Replace
Open Find and Replace

Press Ctrl + F on your keyboard to open the Find dialog box in Excel. It works across any active sheet you’re viewing.

This opens a small window titled Find and Replace with options for more detailed searches.

Find and Replace Options button
Find and Replace Options button

Click on the Options button in the dialog box if it’s not already expanded. You’ll now find the advanced filters, like search direction and type.

From the Look in drop-down, choose Formulas so the tool can search inside formulas, links, and hyperlink functions.

Find All to get a list
Find All to get a list

In the Find what box, type part of what you’re trying to find. You can use common choices, including http, .com, a file name, or any unique text you know is in the link.

Keep the input short and specific to make sure it catches both visible and hidden links.

Click Find All to get a list of all the cells that contain the search text, along with their sheet names and cell references.

Excel will show results in a table at the bottom of the dialog box. You can click on it to jump directly to each link.

Change it from Sheet to Workbook
Change it from Sheet to Workbook

If you want to search across the entire workbook, go to the Find and Replace Options menu, click on Within, and change it from Sheet to Workbook.

Find in the workbook
Find in the workbook

This expands your search to every sheet in the file, which is especially useful for tracking down scattered or forgotten links.

Since you’re already on the Find and Replace dialog box, let me show you another cool trick.

Replace All
Replace All

You can also use this same tool to replace outdated links by switching to the Replace tab.

Just enter the old link in Find what and the new one in Replace with, then hit Replace All to make the change everywhere.

Replaced URLs
Replaced URLs

The tool will replace the existing URLs with the ones you supplied in the Replace field.

Using the Sort & Filter Tool for Link Text (If Visible)

Excel’s Sort & Filter tool is a quick way to isolate and find links in an Excel worksheet if the link text is visible in the cells, like full URLs, file paths, or recognizable domain names. This method is especially effective when hyperlinks are displayed as plain text or when formulas output the link directly into the cell. It works with both simple lists and complex tables, and it doesn’t require digging through formulas or using advanced features.

Excel Sort & Filter tool
Excel Sort & Filter tool

What makes this method so useful is how intuitive and fast it is. You don’t need to remember any function or formula. Now, let me show you how this method works with a real-world dataset below:

Activate Filter from ribbon
Activate Filter from the ribbon

Click into any cell within the column that might contain links or link-like text, such as URLs, file paths, or named destinations.

Go to the toolbar at the top of the Excel window and click the Data tab to access sorting and filtering controls. In the Sort & Filter group, click the Filter button. This will add small drop-down arrows to each header cell in your table or column range.

Activate Sort & Filter
Activate Sort & Filter

Alternatively, press Ctrl + Shift + L to activate the Sort & Filter tool in the column header row for all of the columns in the selected dataset.

Search keyword in Sort & Filter
Search keyword in Sort & Filter

Click the drop-down arrow on the column where you think the links are visible as text. From the drop-down menu, scroll or type into the search box terms, like http, .com, .net, or even a keyword from the link, to narrow down the results.

Click OK to apply the filtering.

Found links in Excel
Found links in Excel

After applying the filtering, you can see that only the links are visible in the filtered column.

Text Filters
Text Filters

You can also use the Text Filters tool from the same drop-down to create custom filter conditions.

Simply hover the mouse cursor over the Text Filters menu on the Sort & Filter context menu, and select any of the following options from the right side overflow menu:

  • Equals
  • Does Not Equal
  • Begins With
  • Ends With
  • Contains
  • Does Not Contain
  • Customised Filter
Customised Autofilter
Customised Autofilter

For URLs, it’s better to use the Contains option. Click Contains to open the Customised Autofilter dialog box.

Now, type keywords, like http, .com, .net, .aspx, and so on. Click OK.

Filtered using Text Filters
Filtered using Text Filters

Only the cells in the selected column, containing the links with the said protocols or text, would show up as filtered results.

I have only used the Contains option in the Customised Autofilter dialog box. You can, however, try with the other conditions to improve filtered data results.

So, this is how you find one or more links in Excel using the Sort & Filter tool.

Using Conditional Formatting to Highlight Links

The Conditional Formatting tool allows you to detect all visible links or URLs in the worksheet visually. You can apply specific cell formatting so the links can be easily located within the worksheet.

Let’s find out below how to use this tool:

New Rule

Start by selecting the range of cells where you think the links might be present. This could be a single column, a full table, or even an entire worksheet. Make sure the selection includes the actual cells containing the link text, not just headers.

Go to the Home tab on the ribbon at the top of Excel, then click on Conditional Formatting.

From the drop-down menu, hover over New Rule to bring up a list of rule types you can create.

New Formatting Rule
New Formatting Rule

In the New Formatting Rule dialog box, choose the option that says Use a formula to determine which cells to format. This allows you to enter a custom formula that checks for link-related patterns within your selected cells.

In the formula box, type the following formula:

=OR(
  ISNUMBER(SEARCH("http", A1)),
  ISNUMBER(SEARCH("www", A1)),
  ISNUMBER(SEARCH(".com", A1)),
  ISNUMBER(SEARCH(".net", A1)),
  ISNUMBER(SEARCH(".org", A1))
)

You don’t need to customize the formula at all. Just copy and paste it as is.

Format Cells
Format Cells

Click the Format button on the same dialog box to choose how you want the links to be highlighted. This could be a background color, bold font, or even a border.

Apply Rule
Apply Rule

Once you’ve set your format, click OK to apply the rule.

Highlight links
Highlight links

Excel will now automatically highlight all cells within your selected range that contain the specified pattern. You’ll instantly see which cells include link-like content, making it easier to focus on or extract just those values.

A drawback of this method is that it can’t detect cells that have hyperlinked text. So, the URLs or links must be visible in the cells to be found using this method.

Using Power Query

When working with a large external dataset, Power Query is extremely helpful in detecting links or URLs. It allows you to work on a large dataset to extract the cells that only contain links and get rid of the rest of the dataset. Also, once you set up a query, you can run it repeatedly to get the links you need. This method also works on data already saved in an Excel worksheet.

From SQL Server Database
From SQL Server Database

First, you need to import data into Power Query. If you’re using an external source, go to the Data tab and click on the Get Data command.

Hover the mouse cursor over the available data sources, like From Database.

Again, hover over the data source you’ve chosen, and a new overflow menu will show. From there, select the actual data connector, like From SQL Server Database.

Now follow the onscreen instructions to complete the data import process.

From Table Range
From Table Range

If you’re working on a dataset in the active worksheet, select the data, and click on the From Table/Range command in the Data tab.

Then, click on the OK button in the Create Table dialog box.

Data in Power Query
Data in Power Query

So far, you’ve imported data into the Power Query Editor interface.

Custom Column wizard
Custom Column wizard

Click on the Column tab and select the Custom Column command.

On the Custom Column wizard, type a column name, like Links, in the New column name field.

Now, go to the Custom column formula field and enter this formula:

=Text.Contains([Data], "http") or Text.Contains([Data], "www") or Text.Contains([Data], ".com")

Replace Data with the column name where you think links are available.

Click OK to create the custom column named Links.

The Links column
The Links column

You should now see a bunch of True and False text in the Links column.

Use Filter
Use Filter

Click on the drop-down button in the top right corner of the Links column and uncheck everything except the True checkbox.

Filtered rows with links
Filtered rows with links

Click OK, and Power Query will remove all other rows except those that have links in the Data column.

Close & Load To
Close & Load To

Click on the File button in the top right corner and choose Close & Load To button.

Import Data dialog box
Import Data dialog box

The Import Data dialog box will show up. Select the Existing worksheet option and select the cell on the active worksheet where you wish to import the filtered cells.

Click OK to complete the import process.

Found links using Power Query
Found links using Power Query

That’s it! You’ve successfully found links in a dataset using Power Query.

Refresh query
Refresh query

When your data gets updated, go to the Queries & Connections navigation panel on the right, right-click on the Table1 query, and select Refresh from the context menu.

The new filtered table will be imported automatically.

Using Excel VBA

The best way to look up visible and hyperlinked links in Excel is by using a VBA macro. Excel VBA also allows you to automate the process.

If you’re new to VBA macros, go through the following tutorial to learn how to set up a macro from a VBA script:

Now that you know how to create a VBA macro in Excel, use this script to set your own macro that will find all kinds of links:

VBA script
VBA script
Sub HighlightAllLinksInRange()

    Dim rng As Range
    Dim cell As Range
    Dim countLinks As Long
    Dim h As Hyperlink
    
    ' Prompt user to select a range
    On Error Resume Next
    Set rng = Application.InputBox("Select the range to scan for links:", "Select Range", Type:=8)
    On Error GoTo 0
    
    If rng Is Nothing Then
        MsgBox "No range selected. Exiting script.", vbInformation
        Exit Sub
    End If

    ' Clear previous highlighting (optional)
    rng.Interior.ColorIndex = xlNone

    countLinks = 0

    ' First, check for visible URL patterns
    For Each cell In rng
        If Not IsEmpty(cell.Value) Then
            If InStr(1, cell.Text, "http", vbTextCompare) > 0 _
            Or InStr(1, cell.Text, "www.", vbTextCompare) > 0 _
            Or InStr(1, cell.Text, ".com", vbTextCompare) > 0 Then
                cell.Interior.Color = RGB(198, 239, 206) ' Light green
                countLinks = countLinks + 1
            End If
        End If
    Next cell

    ' Then, check for anchored hyperlinks
    For Each h In rng.Worksheet.Hyperlinks
        If Not Intersect(h.Range, rng) Is Nothing Then
            h.Range.Interior.Color = RGB(198, 239, 206) ' Light green
            countLinks = countLinks + 1
        End If
    Next h

    ' Show confirmation
    MsgBox countLinks & " link(s) found and highlighted in the selected range.", vbInformation, "Scan Complete"

End Sub
Macro dialog box
Macro dialog box

Once the macro is ready, press Alt + F8 to launch the Macro dialog box.

Select the HighlightAllLinksInRange macro and Hit Run.

Select range
Select range

A dialog box will ask you to select the range you want Excel to scan for visible links and hyperlinks.

Links found using VBA
Links found using VBA

Click OK, and Excel will highlight all the links in a light green background color.

Conclusions

So, these are some of the popular methods to find links in Excel worksheets or workbooks.

If you’ve found this Excel tutorial useful, don’t forget to share your acknowledgement in the comment box. Also, share it in your network, or friends and colleagues, to help them with some cool Excel guides.

About the Author

Bipasha Nath

Bipasha Nath

Bipasha is a technical content writer with 10+ years of experience in the technology industry. She previously worked in a SaaS software development company focused on SharePoint, OneDrive, Word, Excel, Word solutions.

Related Posts

Comments

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Get the Latest Microsoft Excel Tips