Glasgowsmile
Active Member
- Joined
- Apr 14, 2018
- Messages
- 280
- Office Version
- 365
- Platform
- Windows
Hello,
Have the following code which works except it highlights the entire area it posted the data after doing the macro instead of just staying where the cell originally was.
How can I get it to stay on cell B2 after running this code?
Have the following code which works except it highlights the entire area it posted the data after doing the macro instead of just staying where the cell originally was.
How can I get it to stay on cell B2 after running this code?
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.CountLarge > 1 Then Exit Sub
If Target.Value = "" Then Exit Sub
If Not Intersect(Target, Range("B2:B20")) Is Nothing Then
Sheets(Target.Value).Range("A1:U50").Copy Range("L1").Value
End Sub