title: VBA Cell Offset Replaces Previous Cell Value
body: <p>Got a problem with VBA merged cells/ offset property. I want to go through a list containing merged cells and display the range for each merged cell.</p>
  <p><strong>Example:</strong></p>
  <ul>
  <li><p>Range (&quot;A1&quot;).Value is &quot;Addresses&quot;</p>
  </li>
  <li><p>Range (&quot;A2:A50&quot;) is a merged cell with value &quot;xyz@hotmail.com&quot;</p>
  </li>
  </ul>
  <p><strong>When I run the code below:</strong></p>
  <ul>
  <li>Issue 1: Range (&quot;A1&quot;).Value is transformed to &quot;xyz@hotmail.com&quot;</li>
  <li>Issue 2: After the offset, MergeArea.Address still returns Range (&quot;A1&quot;) and not Range (&quot;A2:A50&quot;)</li>
  </ul>
  <p>My code:</p>
  <pre><code>Sub Macro1()
  
     Dim CellA As Range    
     Set CellA = Range(&quot;A1&quot;)
  
     Do Until IsEmpty(CellA.Value) = True
  
      If CellA.MergeCells = False Then    
       CellA = CellA.Offset(1, 0)    
      Else   
       CellA = CellA.Offset(1, 0)   
       MsgBox (CellA.MergeArea.Address)
      End If
  
     Loop
  
  End
  </code></pre>