built4thekill
New Member
- Joined
- Oct 26, 2020
- Messages
- 22
- Office Version
- 365
- Platform
- Windows
Hi,
I've used the below code to automatically copy cells when clicking on them in a certain column. (I got this from another thread in this forum but quite a dated one). I need help figuring out how to do the same for a separate column on the same worksheet. I tried just adding a new module and changing the range but it doesn't work for some reason. So below all the stated cells in column copy no problem when clicking but now i want to add certain cells in column T. thanks in advance
I've used the below code to automatically copy cells when clicking on them in a certain column. (I got this from another thread in this forum but quite a dated one). I need help figuring out how to do the same for a separate column on the same worksheet. I tried just adding a new module and changing the range but it doesn't work for some reason. So below all the stated cells in column copy no problem when clicking but now i want to add certain cells in column T. thanks in advance
VBA Code:
Sub Worksheet_SelectionChange(ByVal Target As Range) 'single click version
If Intersect(Target, Range("D24,D25,D28,D35,D38:D48")) Is Nothing Then
Application.CutCopyMode = False 'clears clipboard and stops cell flashing - like pushing escape key
Exit Sub
Else
ActiveCell.Copy
End If
End Sub