Question: I have a simple spreadsheet where one column has a String *(It's a title of a page)* and the other one has a URL of that page:

[![enter image description here](https://i.stack.imgur.com/2QI6s.png)](https://i.stack.imgur.com/2QI6s.png)

I simply want a function to automate adding the link the title as below since I have thousands of them:

[![enter image description here](https://i.stack.imgur.com/HAuXN.png)](https://i.stack.imgur.com/HAuXN.png)

Thanks

Answer: 
See the documentation on the [`HYPERLINK`](https://support.office.com/article/hyperlink-function-333c7ce6-c5ae-4164-9c47-7de9b76f577f) function.

![img](https://i.stack.imgur.com/M40kA.gif)

In the example, the formula in `D3` is `=HYPERLINK(C3,B3)`.

Since the information of both Columns `B` and `C` are contained in the hyperlink, those columns no longer need to be visible (so they can be hidden).
Try:

```
Sub Test()

    Dim LastRow As Long
    Dim i As Long

    LastRow = Sheet4.Range("A" & Rows.Count).End(xlUp).Row

    For i = 1 To LastRow
        With Sheet4
            .Hyperlinks.Add Anchor:=.Range("A" & i), Address:= _
            .Range("A" & i).Offset(0, 1).Value, TextToDisplay:=.Range("A" & i).Value
            .Range("A" & i).Offset(0, 1).Value = "" '<= Remove address from the second column
        End With
    Next i

End Sub

```