Basically I have a list of all my open po's in the "Open PO's" worksheet and when they are complete I manually copy them to either of the customers name for example "Mecano" tab and delete the row from "Open PO's". A job is completed when the value of that row in column N = 0.
Can someone point me in the right direction of some VBA code that would do the following:
1) Select a row(s) in "Open PO's" if the value in column B of the row reaches 0.
2) Copy selected rows.
3) Paste selected rows into correct customers name tab, example "Mecano" on the first blank row available and then every other blank row after that if there is more than one to do at a time.
4) Delete the selected rows that were just copied in "Open PO's".
I found a code on a similar thread posted a couple of years ago, however im not savy in VB or coding however I would like to see if this can be done this is the string of codes I saw also
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("N:N")) Is Nothing Then
If Target.Count = 1 Then
Dim RowNum As Integer
If Target = 0 Then
RowNum = Sheets("Completed").Range("A65536").End(xlUp).Row + 1
Target.EntireRow.Copy Destination:=Sheets("Completed").Cells(RowNum, 1)
Target.EntireRow.Delete
End If
End If
End If
End Sub
Private Sub Worksheet_Calculate()
Dim Cll As Range
Dim RowNum As Integer
For Each Cll In Sheets("JOBS ON HAND").Range("N1:N" & Range("A65536").End(xlUp).Row)
If IsError(Cll) = False Then
If Cll.Value = 0 Then
RowNum = Sheets("COMPLETED").Range("A65536").End(xlUp).Row + 1
Cll.EntireRow.Copy Destination:=Sheets("COMPLETED").Cells(RowNum, 1)
Cll.EntireRow.Delete
End If
End If
Next Cll
End Sub
The only thing is I don't know how to make it copy rows and paste it in specific customer tabs
Thanks for your assistance.
Bookmarks