Hi,
I am trying to write a code then when someone clicks on a cell in Range G8:G1007 if the selected cell value is 'Copy' it copys the cell 2 columns along on the row that was selected but I can't work it out! Any pointers?
I am trying to write a code then when someone clicks on a cell in Range G8:G1007 if the selected cell value is 'Copy' it copys the cell 2 columns along on the row that was selected but I can't work it out! Any pointers?
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim KeyCells As Range
Set KeyCells = Range("G8:G1007")
If Not Application.Intersect(KeyCells, Range(Target.Address)) _
Is Nothing Then
If ActiveCell.Value = "Copy" Then
ActiveCell.Offset(, 2).Copy
End If
End If
End Sub