I have this code to show a cell’s contents as a message box when double clicked.
It points to Column CE, however this changes frequently.
Is it possible to have the formula point the column based on the header rather than specifying the actual row?
It points to Column CE, however this changes frequently.
Is it possible to have the formula point the column based on the header rather than specifying the actual row?
Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Not Intersect(Target, Range("CE10:CE1000")) Is Nothing Then
If Target.Cells.count = 1 Then
If UCase(Target.Value) = UCase("No issues reported") Then
If MsgBox("No issues reported" & vbNewLine & vbNewLine & "Comments must be added on the 'On going issues' sheet", vbOKOnly) = vbOK Then
Call offsetCell
Exit Sub
End If
Else
MsgBox Target.Value
Call offsetCell
End If
End If
End If
End Sub