| 
    
     |  | >品名の列に名前を入力すると、自動であいうえお順に並び、 >それに伴う受注日なども一緒に付いていくようにしたいです。
 
 Private Sub Worksheet_Change(ByVal Target As Range)
 
 On Error GoTo err:
 
 ' ソート
 If ((Target.Column = 5) And (Target.Row >= 6)) Then
 Range(Cells(6, 1), Cells(Range("A6").End(xlDown).Row, Range("A6").End(xlToRight).Column)).Select
 Selection.Sort Key1:=Range("E6"), Order1:=xlAscending
 End If
 
 With Target
 If .Count <> 1 Then Exit Sub
 If .Row = 1 Then Exit Sub
 If .Column <> 9 Then Exit Sub
 If .Value = "済" Then
 Application.EnableEvents = False
 n = Worksheets("Sheet2") _
 .Range("I" & Rows.Count).End(xlUp).Offset(1).Row
 .EntireRow.Copy Worksheets("Sheet2").Cells(n, 1)
 .EntireRow.Delete
 End If
 End With
 
 err:
 Application.EnableEvents = True
 End Sub
 
 ざっくりとしか、元のコード見てませんが。
 
 
 |  |