How to Extract Hyperlinks from Multiple Images in Excel


With the help of Microsoft Excel, you may manage and examine data in a variety of ways. The ability to attach photos to URLs is one of its less well-known features. When you have a collection of photographs and wish to link each one to a particular website or document, this might be really helpful.

We'll go over step-by-step how to extract hyperlinks from multiple photos in Excel in this article. You will have a comprehensive grasp of how to extract hyperlinks from numerous photos in Excel at the end of this course, enabling you to work with your image data more quickly and effectively. This article is made to enable you to fully utilise Excel, whether you are a data analyst, researcher, or just someone who wants to handle images and the links that go with them. In order to extract hyperlinks from numerous photos in Excel, let's get started.

Extract Hyperlinks from Multiple Images

Here, we will first create a VBA module and then run it to complete the task. So let us see a simple process to learn how you can extract hyperlinks from multiple images in Excel.

Step 1

Consider an Excel sheet where you have a list of images with hyperlinks similar to the below image.


First, use Alt + F11 to open the VBA application.

Step 2

Then click on Insert, select Module, and copy the below code into the textbox.

Example

Sub ExtractHyperlinkFromPicture()
   Dim xSh As Shape
   Dim xScreen As Boolean
   xScreen = Application.ScreenUpdating
   Application.ScreenUpdating = False
   For Each xSh In ActiveSheet.Shapes
      If xSh.Type = msoPicture Then
         On Error Resume Next
         Range(xSh.TopLeftCell.Address).Offset(0, 3).Value = xSh.Hyperlink.Address
         On Error GoTo 0
      End If
   Next
   Application.ScreenUpdating = xScreen
End Sub 

Step 3

Then save the sheet as a macro-enabled template and click F5 to run the module. Then you can see that hyperlinks will be extracted in the adjacent cell.

Conclusion

In this tutorial, we have used a simple example to demonstrate how you can extract hyperlinks from multiple images in Excel to highlight a particular set of data.

Updated on: 13-Jul-2023

291 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements