Se7enSquared
10/18/2019 - 11:32 PM

Get value from selected cell

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)
    On Error Resume Next
    If Intersect(Target, Range("G:K")) Is Nothing Then
        prevValue = ""
    Else
        prevValue = Target.Value
    End If
End Sub