title: VBA Code Adjustment - Loop, copy to new sheet
body: <p>I have the below code from Chandoo for excel. In the 'Data Sheet' it selects the sheet to copy to according to col. C, then copies col. A - G to that spreadsheet and moves to the next entry.</p>
  
  <p>I am having trouble adjusting this code to suit my spreadsheet and would appreciate some assistance. My sheet name is in col. A (not c), and I only require col. B &amp; C to be copied to the sheet. Additionally col. B &amp; C need to be copied into col. B &amp; G in the spreadsheet.</p>
  
  <pre><code>Sub copyPasteData()
      Dim strSourceSheet As String
      Dim strDestinationSheet As String
      Dim lastRow As Long
  
      strSourceSheet = "Data entry"
  
      Sheets(strSourceSheet).Visible = True
      Sheets(strSourceSheet).Select
  
      Range("C2").Select
      Do While ActiveCell.Value &lt;&gt; ""
          strDestinationSheet = ActiveCell.Value
          ActiveCell.Offset(0, -2).Resize(1, ActiveCell.CurrentRegion.Columns.Count).Select
          Selection.Copy
          Sheets(strDestinationSheet).Visible = True
          Sheets(strDestinationSheet).Select
          lastRow = LastRowInOneColumn("A")
          Cells(lastRow + 1, 1).Select
          Selection.PasteSpecial xlPasteValues
          Application.CutCopyMode = False
          Sheets(strSourceSheet).Select
          ActiveCell.Offset(0, 2).Select
          ActiveCell.Offset(1, 0).Select
      Loop
  End Sub
  
  Public Function LastRowInOneColumn(col)
      'Find the last used row in a Column: column A in this example
      'http://www.rondebruin.nl/last.htm
      Dim lastRow As Long
      With ActiveSheet
      lastRow = .Cells(.Rows.Count, col).End(xlUp).Row
      End With
      LastRowInOneColumn = lastRow
  End Function
  </code></pre>
  
  <p>Any assistance in resolving this would be greatly appreciated.</p>
  
  <p>Thank you</p>