Evening,
how do I stop the below code applying to the entire sheet, i wish for it to only take affect on a set range, in this instance g2:g35
how do I stop the below code applying to the entire sheet, i wish for it to only take affect on a set range, in this instance g2:g35
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range) 'Task1: Show your active cell contents in cell E2
actval = ActiveCell.Value
actaddr = ActiveCell.Address
Range("E2") = actval
'Task2: Turn selected cell red
'first set entire background white
Range("g2:g35").Interior.Color = xlNone
ActiveCell.Interior.ColorIndex = 3
End Sub