Copy a Cell to Clipboard with Single Click

This post will teach you how to use the Excel VBA macro code to copy a Cell to clipboard with only single click in Excel. How do I automatically copy the content of cell to Clipboard while clicking on the Cell or just single click on the cell in Microsoft Excel 2016, 2013 and older versions.

Normally, to copy a cell to the clipboard, you need to select a Cell firstly, press Ctrl + C shortcut to copy the content into clipboard. Whether there is any other ways to omit one or two steps to copy a cell to clipboard. Of course yes, you can try to write an Excel Macro code to copy cell content into clipboard while you click on that cell.

Copy a Cell to Clipboard with Single Click with VBA Macro

Let’s see the below detailed steps:

1# open your worksheet contain cells that you want to copy them to clipboard.

2# right click on the sheet tab, then select View Code menu from the pop-up menu list.

copy a cell to clipboard1

3# then the “Visual Basic Editor” window will appear

4# paste the below VBA code into the code window. Then clicking “Save” button.

copy a cell to clipboard2

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If Not Intersect(Target, Range("A1:A4")) Is Nothing Then
        Target.Copy
    End If
End Sub

5# try to click cell A1 to A4, you will see that all Cell that you clicked are copied to clipboard automatically.

copy a cell to clipboard3

If you want to use this VBA macro code, just need to update the Range as you need.

 

 

 

Leave a Reply