KutoolsforOffice — One Suite. Five Tools. Get More Done.February Sale: 20% Off

How to combine text and hyperlink into a hyperlinked text in Excel?

AuthorSiluviaLast modified

When working with Excel, it is common to maintain separate columns for display text (such as project names, item descriptions, or document titles) and their corresponding hyperlinks (URLs or file paths). However, there are scenarios where you may need to merge these two elements—combining the descriptive text with its associated link into a single cell as a clickable hyperlink, as shown in the screenshot below. Doing so improves readability, reduces clutter, and makes worksheets more interactive for viewers. This tutorial provides detailed methods to efficiently achieve this, tackling both basic and advanced needs.

combine text and hyperlink into a hyperlinked text


Combine text cell and hyperlink cell with a formula

For most straightforward tasks, using the HYPERLINK function is an efficient way to merge text and link in Excel. This method is well-suited for standard records where the web address or file path corresponds directly to the text label. It is especially effective when combining two columns with one formula and can be quickly extended to large datasets.

Syntax

=Hyperlink(link_location,[friendly_name])

Parameters explanation:

  • link_location (required): The actual address to link to, which can be a URL, file path, or workbook location.
  • friendly_name (optional): The text you want to display in the cell (if omitted, the link_location is displayed as the link text).

To apply this method:

1. Select a blank cell where you want the combined result to appear. Enter or copy the following formula into that cell, then press Enter to confirm:

=HYPERLINK(B2,A2)

apply a formula to combine text cell and hyperlink cell

Note: In this example, B2 contains the web address or hyperlink, while A2 contains the text to be displayed as the clickable link in the resulting cell. Adjust references as needed if your data starts from a different row.

Afterward, hover over the bottom-right corner of the cell (the fill handle), then drag it down to fill the formula for additional rows. This will automatically generate clickable hyperlinks for each pair in your table.

drag and fill the formula to other cells

  • If either the text cell or link cell is empty, the formula may generate an invalid hyperlink or display an error. Double-check both columns before applying to large ranges.
  • When linking to external files or other locations within a workbook, ensure the path is accessible by anyone who needs to use the hyperlink.
  • This formula-based method does not retain any pre-existing cell formatting from the original text or link cells.

In case the hyperlinks do not seem clickable after applying the formula, make sure the cell format is set to “General” (not “Text”), or re-enter the formula for Excel to recognize it.


Easily combine cells in different columns or rows into one cell in Excel:

The Combine Rows & Columns utility of Kutools for Excel can help you quickly combine cells in different rows or columns into a single cell. See below demo:
Download and try it now! (30-day free trail)


VBA code to combine text and hyperlink into hyperlinked text (bulk & advanced scenarios)

While formulas are convenient for straightforward one-to-one data, complex requirements—such as combining multiple pieces of text, applying the same hyperlink to several cells, or handling advanced formatting—may require a more automated approach. Using Excel VBA lets you perform bulk operations in just a few clicks and gives you greater flexibility. The VBA method is especially useful when you need to process a large dataset at once or concatenate multiple columns into the display text for each hyperlink.

Use case: For example, you want to create a hyperlink that uses the contact name and department as the display text, and links to their profile page URL, all in one cell for each row.

Precautions: VBA cannot be undone with Ctrl+Z. Consider saving your workbook before running the code. If your data set includes special characters, ensure the link text and URLs are properly formatted.

How to use:

1. Go to the Developer tab > Visual Basic. In the Visual Basic for Applications editor that opens, click Insert > Module, and paste the following VBA code inside:

Sub CombineTextAndHyperlink()
    Dim ws As Worksheet
    Dim lastRow As Long
    Dim i As Long
    Dim linkText As String
    Dim linkURL As String
    Dim resultCol As Long
    
    On Error Resume Next
    xTitleId = "KutoolsforExcel"
    
    Set ws = Application.ActiveSheet
    
    ' Prompt for text column, link column, and output column
    Dim rngText As Range
    Dim rngLink As Range
    Dim rngOutput As Range
    
    Set rngText = Application.InputBox("Select the text column:", xTitleId, Selection.Address, Type:=8)
    Set rngLink = Application.InputBox("Select the hyperlink column:", xTitleId, Selection.Address, Type:=8)
    Set rngOutput = Application.InputBox("Select the result output column:", xTitleId, Selection.Address, Type:=8)
    
    If rngText Is Nothing Or rngLink Is Nothing Or rngOutput Is Nothing Then Exit Sub
    
    lastRow = ws.Cells(ws.Rows.Count, rngText.Column).End(xlUp).Row
    resultCol = rngOutput.Column
    
    For i = 1 To rngText.Rows.Count
        linkText = rngText.Cells(i, 1).Value
        linkURL = rngLink.Cells(i, 1).Value
        
        If linkText <> "" And linkURL <> "" Then
            ws.Hyperlinks.Add Anchor:=ws.Cells(rngText.Cells(i, 1).Row, resultCol), _
                              Address:=linkURL, TextToDisplay:=linkText
        End If
    Next i
End Sub

2. Click the Run button “Run” button in the VBA editor toolbar. You will be prompted with dialog boxes to select:
- The column containing your text
- The column containing your hyperlinks
- The column for outputting the new combined hyperlinked text
After these selections, the macro will automatically fill the output column with clickable hyperlinked cells using your text and URLs from each row.

  • This macro can process an entire column or a specific range—just select appropriately when prompted.
  • To combine multiple fields into the display text (such as =A2 &" - "&B2), first use a helper column to concatenate your desired fields, then use that helper as your “text column”.
  • If an error occurs, double-check that the ranges you select are of matching size and located within the same worksheet.

If you encounter unexpected results, such as missing links or errors, verify your data for empty cells and make sure you select matching rows in each range selection prompt. For repetitive tasks, you can save the macro within your workbook for future use.


Other built-in Excel methods: Insert hyperlink manually

For situations where you only need to combine a small number of text and link cells or need additional customization beyond formula-driven approaches, the manual "Insert Hyperlink" dialog provides flexible options. This method is ideal when:

  • You need to manually specify the hyperlink for each cell
  • You want to use link targets such as documents, email addresses, or cell references within a workbook
  • You prefer to set link screen tips or advanced display text options

Operation steps:

  1. Select the cell you wish to contain the hyperlinked text.
  2. Type or edit the display text as needed.
  3. Go to the Insert tab and click Link or right-click the cell and choose Link from the context menu.
  4. In the "Insert Hyperlink" dialog box, enter or paste your link (URL, file path, workbook reference, or email address) into the Address field. You can also click "Place in This Document" to link to specific sheets or cells.
  5. Optionally, adjust the display text, add a screen tip, or tweak address options as desired. Click OK to confirm.
  • This method offers maximum flexibility for custom hyperlinks, but may be less efficient for large data ranges.
  • Always check the destination after inserting to confirm the hyperlink works as expected.

If you need to edit or change the hyperlink later, simply right-click the cell and choose "Edit Hyperlink" to adjust the address or display text.

Using the manual dialog is most suitable when links are few, vary greatly in type, or require special labels and options not easily managed by formulas or VBA.


Related articles

Insert multiple hyperlinks in a cell/many cells in Excel
As we all know, in Excel, only one hyperlink can be inserted into a cell by default. This article provides methods to help you batch insert multiple hyperlinks into many cells in Excel.

Create hyperlink in a cell to another sheet in the same workbook in Excel
Do you know how to create a hyperlink in a cell in one sheet that link to a specific cell in another worksheet in the same workbook? Here are two tricky ways for you.

Remove hyperlinks keep cell formatting
Normally, when deleting a hyperlink from a cell with the Remove Hyperlink feature, the cell formatting will be removed with the hyperlink at the same time. If you only want to remove the hyperlink but keep the cell formatting, the method in this article will do you a favor.

Click hyperlink in Excel to go to specific page in Word document
It is easy to create a hyperlink to a certain Word document in Excel. However, do you know how to create a hyperlink in Excel to go to a specific Word document page? The method in this article can do you a favor.

Create dynamic hyperlink based on specific cell value in Excel
Supposing you have a table in a worksheet is named “Summary”, and you want to create dynamic hyperlink in another worksheet that is linked to the cell value in the table, how can you do? The method in this article will help to solve the problem in detail.

Hyperlink to a cell containing today’s date in Excel
This article provides a method in detail to help you quickly create a hyperlink in Excel to link to today’s date cell in a range of cells.

Best Office Productivity Tools

🤖Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |  Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |  Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more
Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!

All Kutools add-ins. One installer

Kutools for Office suite bundles add-ins for Excel, Word, Outlook & PowerPoint plus Office Tab Pro, which is ideal for teams working across Office apps.

ExcelWordOutlookTabsPowerPoint
  • All-in-one suite — Excel, Word, Outlook & PowerPoint add-ins + Office Tab Pro
  • One installer, one license — set up in minutes (MSI-ready)
  • Works better together — streamlined productivity across Office apps
  • 30-day full-featured trial — no registration, no credit card
  • Best value — save vs buying individual add-in