Forum Discussion

tusharkaushik's avatar
tusharkaushik
Copper Contributor
Feb 22, 2021
Solved

Show the Data

What I want is basically whenever i select D2 the same data will be shown in M3. When i go to D3 the same will be shown in M3.   Same for E2 the same data will be shown in N3. Now when i go to E3 t...
  • HansVogelaar's avatar
    Feb 22, 2021

    tusharkaushik 

    Like this:

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
        If Selection.CountLarge = 1 Then
            If Not Intersect(Target, Range("D2:D43")) Is Nothing Then
                Range("M3").Value = Target.Value
            ElseIf Not Intersect(Target, Range("E2:E43")) Is Nothing Then
                Range("N3").Value = Target.Value
            End If
        End If
    End Sub

Resources