Hello Arlu,
You helped me sometime back. I'm trying to replicate what you showed me in a new workbook but can not get it to perform as before.
I'm trying to move specific cell to another sheet if the cell has a value.
I will attach the workbook
I need to have rows moved to Task Summary sheet if column B has a value and need only Column A,B,C,H,M and only applies to rows B24:B40
Here is the code I tried to do copying what you had done before
Private Sub Worksheet_Change(ByVal Target As Range)
Dim lastrow As Long
If Not Intersect(Target, Range("B24:B40")) Is Nothing Then
If Range("B" & Target.Row).Value <> "0" And Range("B" & Target.Row).Value <> "" Then
lastrow = Worksheets("Task Summary").Range("A" & Rows.Count).End(xlUp).Row
Range("A" & Target.Row & ":B" & Target.Row).Copy
Worksheets("Task Summary").Range("A" & lastrow + 1).PasteSpecial (xlPasteValues)
Range("C" & Target.Row & ":C" & Target.Row).Copy
Worksheets("Task Summary").Range("C" & lastrow + 1).PasteSpecial (xlPasteValues)
Range("H" & Target.Row & ":H" & Target.Row).Copy
Worksheets("Task Summary").Range("D" & lastrow + 1).PasteSpecial (xlPasteValues)
End If
End If
End Sub
Here is code you had made for me that I used to get the above code
Private Sub Worksheet_Change(ByVal Target As Range)
Dim lastrow As Long
If Not Intersect(Target, Range("C90:C403")) Is Nothing Then
If Range("C" & Target.Row).Value <> "0" And Range("C" & Target.Row).Value <> "" Then
lastrow = Worksheets("Task Summary").Range("A" & Rows.Count).End(xlUp).Row
Range("A" & Target.Row & ":C" & Target.Row).Copy
Worksheets("Task Summary").Range("A" & lastrow + 1).PasteSpecial (xlPasteValues)
Range("E" & Target.Row & ":E" & Target.Row).Copy
Worksheets("Task Summary").Range("D" & lastrow + 1).PasteSpecial (xlPasteValues)
Range("G" & Target.Row & ":G" & Target.Row).Copy
Worksheets("Task Summary").Range("E" & lastrow + 1).PasteSpecial (xlPasteValues)
Range("I" & Target.Row & ":I" & Target.Row).Copy
Worksheets("Task Summary").Range("F" & lastrow + 1).PasteSpecial (xlPasteValues)
End If
End If
End Sub
When I paste code into into editor as is nothing happens
ThanksExample MBBW.xlsx
Bookmarks