-
Hi Nicki
Try
[VBA]Private Sub Worksheet_Change(ByVal Target As Range)
ActiveSheet.Unprotect
If Target.Cells.Count = 1 And Target.Column = 7 Then
Target.EntireRow.Copy Destination:= _
Sheets("completed").Cells(Rows.Count, 2).End(xlUp).Offset(1, -1)
Target.EntireRow.Delete
End If
ActiveSheet.Protect
End Sub
[/VBA]
Regarding writing to the next line, check that there is always data in column B, if not, change the figures for a column which always has data. Note that 2 changes as are required
For column D
Sheets("completed").Cells(Rows.Count, 4).End(xlUp).Offset(1, -3)
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules