
- MS Excel Basics
- Excel - Home
- Excel - Getting Started
- Excel - Explore Window
- Excel - Backstage
- Excel - Entering Values
- Excel - Move Around
- Excel - Save Workbook
- Excel - Create Worksheet
- Excel - Copy Worksheet
- Excel - Hiding Worksheet
- Excel - Delete Worksheet
- Excel - Close Workbook
- Excel - Open Workbook
- Excel - Context Help
- Editing Worksheet
- Excel - Insert Data
- Excel - Select Data
- Excel - Delete Data
- Excel - Move Data
- Excel - Rows & Columns
- Excel - Copy & Paste
- Excel - Find & Replace
- Excel - Spell Check
- Excel - Zoom In-Out
- Excel - Special Symbols
- Excel - Insert Comments
- Excel - Add Text Box
- Excel - Undo Changes
- Formatting Cells
- Excel - Setting Cell Type
- Excel - Setting Fonts
- Excel - Text Decoration
- Excel - Rotate Cells
- Excel - Setting Colors
- Excel - Text Alignments
- Excel - Merge & Wrap
- Excel - Borders and Shades
- Excel - Apply Formatting
- Formatting Worksheets
- Excel - Sheet Options
- Excel - Adjust Margins
- Excel - Page Orientation
- Excel - Header and Footer
- Excel - Insert Page Breaks
- Excel - Set Background
- Excel - Freeze Panes
- Excel - Conditional Format
- Working with Formula
- Excel - Creating Formulas
- Excel - Copying Formulas
- Excel - Formula Reference
- Excel - Using Functions
- Excel - Builtin Functions
- Advanced Operations
- Excel - Data Filtering
- Excel - Data Sorting
- Excel - Using Ranges
- Excel - Data Validation
- Excel - Using Styles
- Excel - Using Themes
- Excel - Using Templates
- Excel - Using Macros
- Excel - Adding Graphics
- Excel - Cross Referencing
- Excel - Printing Worksheets
- Excel - Email Workbooks
- Excel- Translate Worksheet
- Excel - Workbook Security
- Excel - Data Tables
- Excel - Pivot Tables
- Excel - Simple Charts
- Excel - Pivot Charts
- Excel - Keyboard Shortcuts
- MS Excel Resources
- Excel - Quick Guide
- Excel - Useful Resources
- Excel - Discussion
How to check if hyperlink exists in a worksheet in Excel?
If we have a huge data where hyperlinks have been scattered throughout the worksheet, then it becomes a tedious task to find the hyperlinks and external references. This tutorial will help a user to find the hyperlinks available in a worksheet in the following scenarios −
Find all the hyperlinks in Excel
Find all the hyperlinks linked to a specific text
Find all hyperlink locations with VBA Code
Find All Hyperlinks in Excel
Step 1 − A sample worksheet has been shown below with scattered hyperlinks.
Step 2 − Please note that, using Find and Replace feature, all hyperlinks can be identified easily. For this, press Ctrl+H on the keyboard. The find and replace dialog box will open.
Or you can open the same by following the below path −
Home > Editing > Find & Select > Replace
Step 3 − On Find & Replace dialog box, click Options.
Step 4− The dialog box will expand as following. Go to Format against Find what and click the down arrow to select Choose Format from Cell.
Step 5 − Select a cell from the worksheet which has a hyperlink. Then a preview of the cell data will be displayed as following. Now click Find All button at the bottom of dialog box.
Step 6 − It will display all the hyperlinked cells in a list as shown below. You may select each cell individually or hold the control key to select multiple cells from the list.
Find All Hyperlinks Linked to SpecificText in Excel
Step 1 − A sample worksheet has been shown with some similar hyperlinked cell values.
Step 2 − Repeat the step 2 and 3 from the above method.
Step 3 − Go to Format against Find what and click the down arrow to select Choose Format from Cell. Now select a cell for which specific text hyperlink to be searched. Next, in the Find what field enter the exact cell value that you want to find.
Step 4 − Now click Find All button at the bottom of dialog box. It will display all the hyperlinked cells with the entered value in a list as shown below. You may select each cell individually or hold the control key to select multiple cells from the list.
Find all hyperlink locations with VBA Code
Step 1 − Press Alt+F11 keys on the keyboard and this will open the window of Microsoft Visual Basic for applications.
Step 2 − In the Microsoft Visual Basic for applications window, go to Insert > Module.
Step 3 − Now paste the following code in the workspace as following −
Code Snippet
Sub HyperlinkCells() \ A VBA function used to jump to a location of a worksheet where hyperlinks are available Dim xAdd As String \ Adding a variable xAdd as string type Dim xTxt As String \ Adding a variable as xText as string type Dim xCell As Range \ Adding a variable xCell as Range type Dim xRg As Range \ Adding a variable as xRg as range type. On Error Resume Next \ when a run-time error occurs, go to the statement immediately following the statement where the error occurred and execute next. xTxt = ActiveWindow.RangeSelection.AddressLocal \ Returns a Range object that represents the selected cells on the worksheet in the active window Set xRg = Application.InputBox("Please select range:", "Kutools for Excel", xTxt, , , , , 8) \ A popup message box to display range of cells If xRg Is Nothing Then Exit Sub \ If no hyperlink is found then exit from the sub statement For Each xCell In xRg \ Condition For each xCell variable in the range If xCell.Hyperlinks.Count > 0 Then xAdd = xAdd & xCell.AddressLocal & ", " \ Condition to count the hyperlinked cells in the active sheet Next If xAdd <> "" Then \ If the value of xAdd is Not Equal to firstAddress then execute the next statement. MsgBox "Hyperlink existing in the following cells: " & vbCrLf & vbCrLf & Left(xAdd, Len(xAdd) - 1), vbInformation, "Kutools for Excel" \ Display a msg box with all hyperlinked cell addresses.) End If \ end if condition End Sub \ end sub statement
Step 4 − Now, press F5 to run the code. A dialog box will open as Kutools for Excel.
Step 5 − Now select the range of dataset in which you want to search the hyperlinks and click OK button.
Step 6 − Then a dialog box will open displaying the cell locations having hyperlinks.
Conclusion
Hence in this article we have learned three methods to find hyperlinks in an excel sheet. Finding hyperlinks in a huge data is a tedious task. Sometimes we need to consolidate the same for reference purpose or data sharing. The VBA code method will actually locate all the hidden hyperlinks also placed without any specific formatting.
Hope this article helped you to learn a new technique of excel. Keep exploring and keep learning.
- Related Articles
- How To Check If a Worksheet Or Workbook Is Protected In Excel?
- How to check if a certain range name exists in Excel?
- How to check if a shape or image exists in an active Excel sheet?
- How to check if a variable exists in JavaScript?
- How to check if a column exists in Pandas?
- How to check if a file exists in Golang?
- How to check if a file exists in Perl?
- How to Auto-Protect a Specific Worksheet in Excel?
- How to add hyperlink to comment in Excel?
- How to check if a key exists in a Python dictionary?
- How to check if a File Type Exists in a Directory?
- How to Convert File Path to Hyperlink in Excel?
- How to Convert Hyperlink to Plain Text in Excel?
- How to check if a vector exists in a list in R?
- How to check if a key exists in a map in Golang?
