Help fixing automatically copying cells when clicking on it

built4thekill

New Member
Joined
Oct 26, 2020
Messages
22
Office Version
  1. 365
Platform
  1. 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

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
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

Forum statistics

Threads
1,214,819
Messages
6,121,749
Members
449,050
Latest member
excelknuckles

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top