Hi guys,
This is my first post and hoping someone can help me as it is driving me CRAZY!!
Just to throw a disclaimer out there, I am doing this all by googling and have no experience in VBA whatsoever.
I want to move a row to another sheet after 'Yes' has been entered into a cell in column 'M' but I want it to be done automatically as soon as 'Yes' is selected in the data validation list that's being used.
I have used the below code on another file earlier on in the week and it works perfectly but will not work for the file I'm working on for some reason. Is there something in Excel that I need to select to get it to do it automatically or is there something I have missed out when changing the code to reflect the file I'm working on?
Here is the code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 13 And Target.Cells.Count = 1 Then
If LCase(Target.Value) = "Yes" Then
With Target.EntireRow
.Copy Sheets("Complete").Range("A" & Rows.Count).End(xlUp).Offset(1, 0)
.Delete
End With
End If
End If
End Sub
Thanks so much for anyone that is able to help, I am about to pull may hair out
This is my first post and hoping someone can help me as it is driving me CRAZY!!
Just to throw a disclaimer out there, I am doing this all by googling and have no experience in VBA whatsoever.
I want to move a row to another sheet after 'Yes' has been entered into a cell in column 'M' but I want it to be done automatically as soon as 'Yes' is selected in the data validation list that's being used.
I have used the below code on another file earlier on in the week and it works perfectly but will not work for the file I'm working on for some reason. Is there something in Excel that I need to select to get it to do it automatically or is there something I have missed out when changing the code to reflect the file I'm working on?
Here is the code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 13 And Target.Cells.Count = 1 Then
If LCase(Target.Value) = "Yes" Then
With Target.EntireRow
.Copy Sheets("Complete").Range("A" & Rows.Count).End(xlUp).Offset(1, 0)
.Delete
End With
End If
End If
End Sub
Thanks so much for anyone that is able to help, I am about to pull may hair out