title: VBA - Detecting a cell change within the context of a macro
body: <p>I'm trying to create a macro that allows users to select a column and extend features of that column to other areas of the worksheet. I'm having trouble understanding how to make this work, though. The basic logic of the routine would be:</p>
  
  <pre><code>(1) Ask user to select column of interest
  (2) Listen for cell click event
  (3) Extract the features of the column chosen by the user
  (4) Apply relevant features in area of the worksheet where the cell was active at the beginning of the macro
  </code></pre>
  
  <p>Is Excel capable of 'listening' for events from within a function like this? If so, how would it be implemented? Thanks.</p>
  
  <h2><strong>UPDATE</strong></h2>
  
  <p>My goal is to create a macro that I can use in any file. The purpose of the macro is to add an additional column to a table which contains checkboxes that can be used to check off items in the table. The only thing that is throwing me off is in certain circumstances a table may have columns that are merged different from one another. For example:</p>
  
  <pre><code>C1    C2
  1     A
  1     B
  2     A
  </code></pre>
  
  <p>In Excel the above table might have cells A1 and B1 merged. I want the user to have the flexibility to determine if there needs to be two checkboxes (to associate the checkboxes with column 1) or three checkboxes (to associate the checkboxes with column 2). So when the macro runs I'd like the user to be prompted to select one of the columns, and then take the merging that is observed in that column and place it in C3. Then in C3 I'll insert a checkbox in each cell associated with the table.</p>
  
  <p>The code below would do the column-merge copy/pasting portion if it is known which column to copy and how many columns away from the end of the table it is. Since I want to use this macro on various tables I need to adapt it to work on the fly.</p>
  
  <pre><code>Sub copyMerges(sourceArea As Range, colOffset As Long)
  
      Dim row, col As Long
      Dim c, c2 As Range
  
      col = 1
      For row = 1 To sourceArea.Rows.Count
            Set c = sourceArea.cells(row, col)
            If c.MergeArea.cells.Count &gt; 1 Then
                 Set c2 = c.Offset(0, colOffset)
                 If c2.MergeArea.cells.Count = 1 Then
                      c2.Resize(c.MergeArea.Rows.Count, 1).Merge
                 End If
            End If
      Next col
  End Sub
  </code></pre>