Dear Experts,
I found a macro from your forum which copies the entire row based on a cell value ("y") -Courtesy Mr. jindon MrExcel MVP. If we type "y" in column D, the entire row is copied & pasted to sheet 2. The code is as follows. The only point for clarification is how will the code change if :-
1) the copied row should be deleted if the cell value is changed / deleted - something like an auto refresh.
2) Also, how can we copy & paste it to a specific sheet in another existing workbook located in another folder.
Forgive me, I am a civil engineer who is just starting to like vb & trying to employ it in my works.
Thanking you,
abckumar
Private Sub Worksheet_Change(ByVal Target As Range)Dim myColumn As StringmyColumn = "D" '<- change hereIf Intersect(Target, Columns(myColumn)) Is Nothing Then Exit SubIf Target.Value <> "y" Then Exit SubTarget.EntireRow.Copy Sheets("sheet2").Range("a" & Rows.Count).End(xlUp)(2)Application.CutCopyMode = FalseEnd Sub</pre>
I found a macro from your forum which copies the entire row based on a cell value ("y") -Courtesy Mr. jindon MrExcel MVP. If we type "y" in column D, the entire row is copied & pasted to sheet 2. The code is as follows. The only point for clarification is how will the code change if :-
1) the copied row should be deleted if the cell value is changed / deleted - something like an auto refresh.
2) Also, how can we copy & paste it to a specific sheet in another existing workbook located in another folder.
Forgive me, I am a civil engineer who is just starting to like vb & trying to employ it in my works.
Thanking you,
abckumar
Private Sub Worksheet_Change(ByVal Target As Range)Dim myColumn As StringmyColumn = "D" '<- change hereIf Intersect(Target, Columns(myColumn)) Is Nothing Then Exit SubIf Target.Value <> "y" Then Exit SubTarget.EntireRow.Copy Sheets("sheet2").Range("a" & Rows.Count).End(xlUp)(2)Application.CutCopyMode = FalseEnd Sub</pre>