I could really use some help. Hopefully someone can dumb this down enough for me to understand.
When making the entry that would execute the data transfer I get the following error, Pastespecial method of range failed, and its in reference to
Sheets("Closed Discrepancies").Cells(Rows.Count, 1).End(xlUp)(2).PasteSpecial xlPasteValuesAndNumberFormat
If I change it to the xlPastevalues I get the following error, Delete method of range class failed for the following line
Range("A" & Target.Row).Resize(, 13).Delete Shift:=xlUp
Complete code is below.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
Application.EnableEvents = False
If Not Intersect(Target, Range("M:M")) Is Nothing Then
If UCase(Target.Value) = "Y" Then
Range("A" & Target.Row).Resize(, 13).Copy
Sheets("Closed Discrepancies").Cells(Rows.Count, 1).End(xlUp)(2).PasteSpecial xlPasteValuesAndNumberFormat
Range("A" & Target.Row).Resize(, 13).Delete Shift:=xlUp
End If
End If
Application.EnableEvents = True
End Sub
Any and all help would be greatly appreciated.
Thank you so much for taking the time to look into what I have going on!
When making the entry that would execute the data transfer I get the following error, Pastespecial method of range failed, and its in reference to
Sheets("Closed Discrepancies").Cells(Rows.Count, 1).End(xlUp)(2).PasteSpecial xlPasteValuesAndNumberFormat
If I change it to the xlPastevalues I get the following error, Delete method of range class failed for the following line
Range("A" & Target.Row).Resize(, 13).Delete Shift:=xlUp
Complete code is below.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
Application.EnableEvents = False
If Not Intersect(Target, Range("M:M")) Is Nothing Then
If UCase(Target.Value) = "Y" Then
Range("A" & Target.Row).Resize(, 13).Copy
Sheets("Closed Discrepancies").Cells(Rows.Count, 1).End(xlUp)(2).PasteSpecial xlPasteValuesAndNumberFormat
Range("A" & Target.Row).Resize(, 13).Delete Shift:=xlUp
End If
End If
Application.EnableEvents = True
End Sub
Any and all help would be greatly appreciated.
Thank you so much for taking the time to look into what I have going on!