Forum Discussion
LS1983
Apr 14, 2020Copper Contributor
How can I overcome the HYPERLINK Functions 255 character limit?
Hi! I am trying to workout how to overcome the 255 character limit for the hyperlink function in excel. Currently I have formulated a HYPERLINK link which pre-populates information for a 3rd part...
NikolinoDE
Apr 14, 2026Platinum Contributor
You can use Alternatively, a small VBA macro to insert a "real" Excel hyperlink, which has a much higher character limit (up to the cell's 32,767 character limit) .
This is ideal for your JotForm links because it will automatically update based on your spreadsheet data whenever you run it.
Here's a sample VBA code that creates a clickable link in the selected cell:
Sub CreateLongHyperlink()
' This macro creates a hyperlink in the currently selected cell
' It bypasses the 255-character limit of the HYPERLINK formula
Dim targetCell As Range
Dim longURL As String
Dim friendlyName As String
' Set the cell where you want the hyperlink
Set targetCell = ActiveSheet.Range("A1") ' <-- CHANGE THIS TO YOUR CELL
' --- IMPORTANT: Build your long URL here by combining strings ---
' This example assumes your URL parts are in cells B1, B2, etc.
' Replace this with your own logic to build the JotForm URL.
longURL = Range("B1").Value & Range("B2").Value & Range("B3").Value
' Set the text you want to see in the cell (e.g., "Fill out Form")
friendlyName = "Open Pre-populated Form"
' Delete any existing hyperlink in the cell
On Error Resume Next
targetCell.Hyperlinks.Delete
On Error GoTo 0
' Add the new, long hyperlink to the cell
targetCell.Parent.Hyperlinks.Add Anchor:=targetCell, _
Address:=longURL, _
TextToDisplay:=friendlyName
' Optional: Confirm it worked
MsgBox "Hyperlink added successfully!", vbInformation
End Sub
Hope that helps.