I am trying to make my code work on the entire column by clicking a button. I am trying to get it to work with out having to highlight and having the one click take car of the entire column if that makes sense. The code deletes an entire row with completed in the column and moves it to another sheet. Side question is there a way to have it work by just hitting enter after entering completed?
Here is my code:
'VBA Code by Scott from SpreadsheetPlanet.com
Sub move_rows_to_another_sheet()
For Each mycell In Selection.Columns(9).Cells
If mycell.Value = "Completed" Then
mycell.EntireRow.Copy Worksheets("Completed").Range("A" & Rows.Count).End(3)(2)
mycell.EntireRow.Delete
End If
Next
End Sub
Here is my code:
'VBA Code by Scott from SpreadsheetPlanet.com
Sub move_rows_to_another_sheet()
For Each mycell In Selection.Columns(9).Cells
If mycell.Value = "Completed" Then
mycell.EntireRow.Copy Worksheets("Completed").Range("A" & Rows.Count).End(3)(2)
mycell.EntireRow.Delete
End If
Next
End Sub