|    | 
     マナ様 
 
ご助言 
ありがとうございます。 
 
「マクロの記録」の結果は下記の通りでございます。 
------------------------------------------------ 
Sub demo1() 
' 
' demo1 Macro 
' 
 
' 
  Sheets("元").Copy Before:=Sheets(3) 
  Sheets("Sheet1").Select 
  Range("A1").Select 
  Selection.Copy 
  Sheets("元 (2)").Select 
  Sheets("元 (2)").Name = "りんご" 
  Sheets("元").Select 
  Application.CutCopyMode = False 
  Sheets("元").Copy Before:=Sheets(4) 
  Sheets("Sheet1").Select 
  Range("A2").Select 
  Selection.Copy 
  Sheets("元 (2)").Select 
  Sheets("元 (2)").Name = "ブドウ" 
  Sheets("元").Select 
  Application.CutCopyMode = False 
  Sheets("元").Copy Before:=Sheets(5) 
  Sheets("Sheet1").Select 
  Range("A3").Select 
  Selection.Copy 
  Sheets("元 (2)").Select 
  Sheets("元 (2)").Name = "なし" 
  Sheets("元").Select 
  Application.CutCopyMode = False 
  Sheets("元").Copy Before:=Sheets(6) 
  Sheets("Sheet1").Select 
  Range("A4").Select 
  Selection.Copy 
  Sheets("元 (2)").Select 
  Sheets("元 (2)").Name = "いちじく" 
  Sheets("元").Select 
  Application.CutCopyMode = False 
  Sheets("元").Copy Before:=Sheets(7) 
  Sheets("Sheet1").Select 
  Range("A5").Select 
  Selection.Copy 
  Sheets("元 (2)").Select 
  Application.Width = 999.75 
  Application.Height = 387 
  Application.Left = 355 
  Application.Top = 300.25 
  Application.Width = 1088.25 
  Application.Height = 387 
  Sheets("元 (2)").Name = "かき" 
  Range("L7").Select 
End Sub 
------------------------------------------------ 
 
上記の工程をループをつかってスマートにできないか 
考えております。 
ちなみにSheet1のA列の行は177行ございます。 
 
よろしくお願いいたします。 
 | 
     
    
   |