Hello
can someone please help me?
Is it possible that when any cell is selected in a row it returns the value of a specific cell in that row?
Here a have a code that returns anything that is selected to B1
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim c As Range
If Not Intersect(Target, Range("A2:F20")) Is Nothing Then
For Each c In Intersect(Target, Range("A2:F20"))
If c.Address = ActiveCell.Address Then
Range("B1").Value = c.Value
Exit For
End If
Next c
End If
End Sub
Example if i select A4 the return value in B1=C4
Sorry i am new to vba