|    | 
     Private Sub CommandButton1_Click() 
 
 If CheckBox1.Value = True Then 
 Cells(行, "F").Copy Sheet2.Range("C6:I7") 
 End If 
 If CheckBox2.Value = True Then 
 Cells(行, "G").Copy Sheet2.Range("K6:Q7") 
 End If 
 If CheckBox3.Value = True Then 
 Cells(行, "H").Copy Sheet2.Range("S6:Y7")  
 End If 
 If CheckBox4.Value = True Then 
 Cells(行, "I").Copy Sheet2.Range("AA6:AG7") 
 End If 
 If CheckBox5.Value = True Then 
 Cells(行, "J").Copy Sheet2.Range("C8:I9") 
 End If 
 If CheckBox6.Value = True Then 
 Cells(行, "K").Copy Sheet2.Range("K8:Q9")  
 End If 
 If CheckBox7.Value = True Then 
 Cells(行, "L").Copy Sheet2.Range("S8:Y9")  
 End If 
 
End Sub 
 
 
よろしくお願いいたします 
ifをまとめるにはどうしたらよろしいでしょうか 
また、sheet2の貼り付けるかセルですが、チェックボックスが入っていないときは詰めて貼り付けたいのですが、どうしたら宜しいでしょうか 
宜しくお願いいたします 
 
 | 
     
    
   |