title: How to overcome the limit of hyperlinks in Excel?
body: <p>I have a list of links in more than 100000 cells.</p>
  
  <p><a href="https://i.stack.imgur.com/sn3FU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sn3FU.png" alt="Example"></a></p>
  
  <p>I have to give hyperlinks to all of them but in Excel there is a limit of 66530 hyperlinks per worksheet. </p>
  
  <p>How can I overcome the limit or how can I merge cells with equal values using VBA?</p>
  
  <pre><code>Sub AddHyperlinks()
  
      Dim myRange As Range
      Set myRange = Range("A1")
      Dim hText As Variant
  
      Do Until IsEmpty(myRange)
  
          hText = Application.VLookup(myRange.Value, Worksheets("Sheet2").Range("A:B"), 2, False)
  
          If IsError(hText) Then
              hText = ""
          Else
              ActiveSheet.Hyperlinks.Add Anchor:=myRange, Address:="http://" + hText, TextToDisplay:=myRange.Text
              hText = ""
          End If
  
          Set myRange = myRange.Offset(1, 0)
      Loop
  
  End Sub
  </code></pre>