title: VBA: Nested For/Loop
body: <p>I am creating a macro that will copy all data from one workbook/multiple sheets into another workbook/multiple sheets.  The first spreadsheet has 7 worksheets named as Sun-Sat.  The second worksheet has 10 worksheets 3 worksheets are irrelevant and the other 7 worksheets are named Sunday-Saturday.</p>
  
  <p>I tested each for loop separately and they work as needed.  When trying to combine them the inner for statement repeats and cycles through all dates before backing out.  I have tried incorporating a exit for to jump out of the inner for but when going back to the inner for it does not increment +1 to go to the next date.  Is there a simple way to add +1 from the outer for statement?</p>
  
  <pre><code>enter code here
  Dim wsShortDays, wsFullDays As Variant
  Dim wsShortDaysCrnt, wsFullDaysCrnt As Long
  Dim SD, FD As Long
  
  wsShortDays = Array("Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat")
  wsFullDays = Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday")
  
  For FD = LBound(wsFullDays) To UBound(wsFullDays)
      With wbk1.Worksheets(wsFullDays(FD))
  
          For SD = LBound(wsShortDays) To UBound(wsShortDays)
              With wbk2.Worksheets(wsShortDays(SD))
                  wbk2.Worksheets(wsShortDays(SD)).Activate
                  Range("A:H").Copy
              End With
              Exit For
          Next SD
  
  
          wbk1.Worksheets(wsFullDays(FD)).Activate
          Range("C:J").PasteSpecial xlPasteAllUsingSourceTheme
          SD = 1
      End With
  Next FD
  </code></pre>