Forum Discussion

Alicia645's avatar
Alicia645
Copper Contributor
Aug 06, 2021
Solved

I'm pretty sure the answer's no, but...

...is there a way to "glue" cells in Excel?    If you have three cells (all containing independent, unrelated values) that you often copy and paste as a group, just from one area of a spreadsheet t...
  • JMB17's avatar
    Aug 07, 2021

    Alicia645 

     

    If a vba solution is acceptable, then I think you may be able to do that.

     

    If you select the cells and give them a name (say "MyGroup", for example), then right click on your worksheet, click view code, and paste this into the code window,  then it should select the group of cells whenever you select one of them. Just change the range name in the code to whatever you decide to use.

     

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
         If Not Intersect(Target, Me.Range("MyGroup")) Is Nothing Then
              Application.EnableEvents = False
              Me.Range("MyGroup").Select
              Application.EnableEvents = True
         End If
    End Sub

     

Resources