Excel VBA Copy Row Based On Cell Value And Paste To Other Sheet
When the "X" value is entered in any cell in column E, the row containing the cell is copied and pasted automatically on the other sheet.
While copying the row to another sheet, the first blank cell is selected in Sheet2 column A and the data is copied there this VBA codes :
evn.Copy Sheets("Sheet2").Range("A" & Sheets("Sheet2").Range("A" & Rows.Count).End(xlUp).Row + 1)
After the row is copied to the other sheet, it is deleted from Sheet1 :
Target.EntireRow.Delete
Background of the row that it is selected for to copy is changed as yellow color :
If Target.Column = 5 Then
Set satir = Range(Cells(Target.Row, "A"), Cells(Target.Row, "E"))
satir.Interior.ColorIndex = 6
...
Set satir = Range(Cells(Target.Row, "A"), Cells(Target.Row, "E"))
satir.Interior.ColorIndex = 6
...
No comments:
Post a Comment