title: Excel Macro for creating new worksheets
body: <p>I am trying to loop through some columns in a row and create new worksheets with the name of the value of the current column/row that I am in.</p>
  
  <pre><code>Sub test()
      Range("R5").Select
      Do Until IsEmpty(ActiveCell)
          Sheets.Add.Name = ActiveCell.Value
          ActiveCell.Offset(0, 1).Select
      Loop
  End Sub
  </code></pre>
  
  <p>This code creates the first one correctly starting at <strong>R5</strong> but then it appears that the macro switches to that worksheet and doesn't complete the task.</p>