Here's what I suggest:
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim MyRange As Range
If Target.Column <> 4 Then Exit Sub
If Target.Value <> "ok" Then Exit Sub
Set MyRange = Range(Target.Offset(0, -3), Target.Offset(0, -1))
TheName = Target.Offset(0, -3).Value
Sheets(2).Copy after:=Sheets(Sheets.Count)
ActiveSheet.Range("A2" ).Select
ActiveSheet.Range(ActiveCell, ActiveCell.Offset(0, 2)).Value = MyRange .Value
On Error GoTo End
ActiveSheet.Name = TheName
End:
End Sub
Above all:
select the macro by pressing Ctrl + C. This opens a copy of your workbook, do Alt + F11, click VBA project on sheet1. In the sheet that opens, do Ctrl + V. SAVE gives a name to your first 2 sheets in the macro. SAVE AGAIN.
Here we consider that the 3 cell are A, B, C, and when they are fulfilled, it is "ok" D-collar following.
Bookmarks