title: copy and paste between 2 worksheets VBA
body: <p>I am trying to write a code to copy some values (3 lines from a source sheet ) to a target sheet.
  The idea is to copy these data by specifying the Week and the year where the data must be added using a userform.
  the data on my source sheet :</p>
  <p><a href="https://i.stack.imgur.com/6NUZ8.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6NUZ8.jpg" alt="enter image description here" /></a></p>
  <p>the userform is populated with test values, number of weeks, year:
  <a href="https://i.stack.imgur.com/w7vIy.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/w7vIy.jpg" alt="enter image description here" /></a></p>
  <p>The data must be added in the 2nd sheet by specifying the year and the Week number, If I choose 2020 on the Week S6 and Test TT AC1, I'll have:</p>
  <p><a href="https://i.stack.imgur.com/oo8SZ.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oo8SZ.jpg" alt="enter image description here" /></a></p>
  <p>So far I have only known how to copy one line from the source sheet, my code is</p>
  <pre><code>Option Explicit
  
  Private Sub CommandButton1_Click()
  Dim WSSource As Worksheet, WSCible As Worksheet
  Dim RngSourceR As Range, RngSourceC As Range, CellSourceR As Range, CellSourceC As Range
  Dim RngCibleR As Range, RngCibleC As Range, CellCibleR As Range, CellCibleC As Range
  Dim RngCibleCs As Range, CellCibleCs As Range
  
  Dim Bad As Boolean
  Dim SR As Integer, SC As Byte
  Dim CR As Integer, CC As Byte
  
  
  
  If Me.ComboBox_Test.ListIndex = -1 Then Bad = True
  If Me.ComboBox_Annee.ListIndex = -1 Then Bad = True
  If Me.ComboBox_Semaine.ListIndex = -1 Then Bad = True
  
  If Bad = True Then
  MsgBox (&quot;Veuillez chosir tous les elements&quot;)
  Exit Sub
  End If
  
  Set WSSource = ThisWorkbook.Worksheets(&quot;Feuil2&quot;)
  Set WSCible = ThisWorkbook.Worksheets(&quot;Feuil1&quot;)
  
  Set RngSourceR = WSSource.Range(&quot;A2:A&quot; &amp; WSSource.Range(&quot;A1000&quot;).End(xlUp).Row)
  Set RngCibleR = WSCible.Range(&quot;A5:A&quot; &amp; WSCible.Range(&quot;A1000&quot;).End(xlUp).Row)
  Set RngCibleC = WSCible.Range(&quot;A1:HA1&quot;)
  
  
  
  For Each CellSourceR In RngSourceR
      If Trim(CellSourceR) = Me.ComboBox_Test Then
          SR = CellSourceR.Row
          
      Exit For
      End If
  Next CellSourceR
  
  'For Each CellSourceC In RngSourceC
  '    If Trim(CellSourceC) = Me.ComboBox_Semaine Then
  '        SC = CellSourceC.Column
  '    Exit For
  '    End If
  'Next CellSourceC
  
  SC = WSSource.Cells(SR, WSSource.Columns.Count).End(xlToLeft).Column
  Set RngSourceC = WSSource.Range(WSSource.Cells(SR, 2), WSSource.Cells(SR, SC))
  
  
  For Each CellCibleR In RngCibleR
      If Me.ComboBox_Num_Test.ListIndex = -1 Then
          If Trim(CellCibleR) = Me.ComboBox_Test Then
              CR = CellCibleR.Row
          Exit For
          End If
      Else
          If Trim(CellCibleR) = Me.ComboBox_Test &amp; Me.ComboBox_Num_Test Then
              CR = CellCibleR.Row
          Exit For
          End If
      End If
  Next CellCibleR
  
  For Each CellCibleC In RngCibleC
      If CStr(CellCibleC) = Me.ComboBox_Annee Then
      Set RngCibleCs = WSCible.Range(WSCible.Cells(4, CellCibleC.Column), WSCible.Cells(4, CellCibleC.Column + 51))
          For Each CellCibleCs In RngCibleCs
              If Trim(CellCibleCs) = Me.ComboBox_Semaine Then
                  CC = CellCibleCs.Column
              Exit For
              End If
          Next CellCibleCs
      End If
  Next CellCibleC
  
  
  WSCible.Cells(CR, CC).Resize(1, RngSourceC.Columns.Count).Value = RngSourceC.Value
  
  End Sub
  </code></pre>
  <p>What should I change to copy the 3 lines instead of only the 1st line ?</p>