title: Excel VBA - Copying multiple ranges and pasting them in order of selection without overwriting
body: <p>So I have no VBA background, but I have managed to put this together by scouring the internet. It is for a workbook where the ultimate goal is to have users (Engineers) select certain checkboxes. When they are done (And there will be a lot of checkboxes), they click the button "Build" and depending on their selections, they will generate a new worksheet or new workbook (Haven't decided on that one yet) with all the selected information pasted into it, in order.</p>
  
  <p>Here is the code as it stands:</p>
  
  <pre><code>Sub Merge()
  
      If Range("F3") = True Then
  
              Sheets("Data").Select
              Range("A1:A8").Select
             Selection.Copy
  
              Sheets("UI").Select
              Cells(1, 1).Select
              Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
                 False, Transpose:=False
              Selection.PasteSpecial Paste:=xlFormats, Operation:=xlNone, SkipBlanks:= _
                 False, Transpose:=False
          Else
                MsgBox "Part 1 - Failed."
      End If
  
      If Range("F6") = True Then
  
              Sheets("Data").Select
              Range("A10:A17").Select
              Selection.Copy
  
              Sheets("UI").Select
              Cells(10, 1).Select
              Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
                 False, Transpose:=False
              Selection.PasteSpecial Paste:=xlFormats, Operation:=xlNone, SkipBlanks:= _
                 False, Transpose:=False
          Else
              MsgBox "Part 2 - Failed"
      End If
  
      If Range("F9") = True Then
  
              Sheets("Data").Select
              Range("A19:A26").Select
              Selection.Copy
  
              Sheets("UI").Select
              Cells(19, 1).Select
              Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
                 False, Transpose:=False
              Selection.PasteSpecial Paste:=xlFormats, Operation:=xlNone, SkipBlanks:= _
                 False, Transpose:=False
          Else
              MsgBox "Part 3 - Failed"
      End If
  
  End Sub
  </code></pre>
  
  <p>and here is the file in my google drive if that makes things easier for you:
  <a href="https://drive.google.com/file/d/0Bza853yM-QSMSlFWbElBc1dsbGM/edit?usp=sharing" rel="nofollow">https://drive.google.com/file/d/0Bza853yM-QSMSlFWbElBc1dsbGM/edit?usp=sharing</a></p>
  
  <p>Currently, it is pasting the ranges that are "True" into pre-defined cell ranges.
  However, what i would like is if Red = True and Green = True, that red is pasted into A1:A8, and Green would be pasted into A10:A18. Similarly, if Blue and Green are True, or just Blue or Green are true, they paste into A1:A8 and the next "True" statement pastes under them. This way you could have any number of True statements and they will paste in order, with only 1 row spaced between them instead of 8 or 20 rows.</p>
  
  <p>I looked over this website and others but didn't find anything. So i'm not sure if this is possible or that i'm too ignorant on the subject to search for the words of the concept i'm looking for.</p>
  
  <p>Thanks for your wisdom!
  -Dan</p>