Hi,
I have added the following formula to excel VBA to move rows to another sheet. The problem is that I'm having to manually run it each time.
Sub move_rows_to_another_sheet()
For Each myCell In Selection.Columns(14).Cells
If myCell.Value = "yes" Then
myCell.EntireRow.Copy Worksheets("Sheet2").Range("A" & Rows.Count).End(3)(2)
myCell.EntireRow.Delete
End If
Next
End Sub
I want this macro to run when something in collumn N is entered. Does anyone know how to do this? I'm a complete novice when it comes to excel.
Thanks in advance
I have added the following formula to excel VBA to move rows to another sheet. The problem is that I'm having to manually run it each time.
Sub move_rows_to_another_sheet()
For Each myCell In Selection.Columns(14).Cells
If myCell.Value = "yes" Then
myCell.EntireRow.Copy Worksheets("Sheet2").Range("A" & Rows.Count).End(3)(2)
myCell.EntireRow.Delete
End If
Next
End Sub
I want this macro to run when something in collumn N is entered. Does anyone know how to do this? I'm a complete novice when it comes to excel.
Thanks in advance