I am using the sub below to create hyperlinks. The problem that I have with this sub is that it converts what looks like a date into date format and what looks like a number to a number. What I want is that it uses the 4 characters as text. How do I avoid that what looks like a number is converted to number and what looks like a date is converted to date format.
Sub MakeHyperlinks()
Application.ScreenUpdating = False
Dim LastRowA As Long
Dim x As Long
LastRowA = ActiveSheet.Range("A" & Rows.Count).End(xlUp).Row
For x = 1 To LastRowA
Cells(x, 3) = Cells(x, 2)
Range("C" & x).Select
y = Cells(x, 1)
Selection.Hyperlinks.Add Anchor:=Selection, Address:=ActiveSheet.Range(Selection.Address).Value, _
TextToDisplay:=y
Next x
Application.ScreenUpdating = True
End Sub
Bookmarks