Try this.
Right click the Tab of your worksheet (Individual) > CLick View Code and paste the code below in the VBA window.
Each cell that you right click will be updated with the value from the header row. I would lock all cells you don't want changing if you accidentally right click it as I see some are locked already.
Private Sub Worksheet_BeforeRightClick(ByVal Target As Excel.Range, Cancel As Boolean)
'Created by Shelton A. (playaller)
Dim C As String
Dim LR As String
C = "$" & Chr$(ActiveCell.Column + 64) 'Column Letter
C2 = "$" & Chr$(ActiveCell.Offset(0, 3).Column + 64) 'Column Letter (3 columns over)
R = "$" & ActiveCell.Row 'Selected Row Number
LR = Replace(Right(Range(C & "$8"), 2), ")", "") 'Strip Header to #) and then Convert #) to #
'If right clicking within this range G:J
If Target.Address = "$G" & R _
Or Target.Address = "$H" & R _
Or Target.Address = "$I" & R _
Or Target.Address = "$J" & R _
Then
Cancel = True 'Cancel the right click menu
Range("G" & R & ":" & "J" & R) = "" 'Erase the row within the section
Target = LR 'Update the active cell with the number in the header
Else
End If
'If right lcicking within this range K:M
If Target.Address = "$K" & R _
Or Target.Address = "$L" & R _
Or Target.Address = "$M" & R _
Or Target.Address = "$N" & R _
Then
Cancel = True 'Cancel the right click menu
Range("K" & R & ":" & "N" & R) = "" 'Erase the row within the section
Target = LR 'Update the active cell with the number in the header
Else
End If
End Sub
Bookmarks