Stores the value of a cell in a variable when the selection changes
' Stores the value of the selected cell in a variable
Dim prevValue As String
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim prevValue As String
On Error Resume Next
If Intersect(Target, Range("G:K")) Is Nothing Then
prevValue = ""
Else
prevValue = Target.Value
End If
End Sub