Sub GoToPCell()
Dim i As Long, j As Integer
Dim PCell As String
Dim lastrow As Long
Dim rng As Range
With Sheet1.Range("A:A")
If Application.WorksheetFunction.CountA(.Cells) <> 0 Then
Set rng = .SpecialCells(xlCellTypeConstants, 1)
Set rng = rng.Areas(rng.Areas.Count)
lastrow = rng.Cells(rng.Cells.Count).Row
End If
End With
For i = 2 To lastrow
If Not IsEmpty(Cells(i, "CT").End(xlToRight)) Then
PCell = Cells(i, "CT").End(xlToRight).Address
ActiveSheet.Hyperlinks.Add Cells(i, 2), Address:="", SubAddress:="'"& Sheet1.Name & "'!"& PCell
End If
Next i
End Sub
Would like to leave the blank cell on the left without creating a blue hyperlink named the current worksheet.