title: Range in Excel VBA
body: <p>I have written this code to merge a few lines in each column, from column C to AZ.</p>
  
  <p>For some reason the range does not match the one I was expecting, in this case the code merges the cells C8:C10 then D8:D12, E8:E12, and so on. lines = 2 in this example.</p>
  
  <p>I don't understand why aren't the ranges matching if lines value is not changing inside the for.</p>
  
  <p>Thanks!</p>
  
  <pre><code>For columns = 0 To 49
  
  
      Range(Range("C8").Offset(0, columns), Range("C8").Offset((lines), columns)).Select
           With Selection
          .HorizontalAlignment = xlCenter
          .VerticalAlignment = xlCenter
          .WrapText = False
          .Orientation = 90
          .AddIndent = False
          .IndentLevel = 0
          .ShrinkToFit = False
          .ReadingOrder = xlContext
          .MergeCells = True
          End With
  
  next comlumns
  </code></pre>