Something like:
In spreadsheet "Complete Backlog", if a cell in Column K = "Open" AND the cell in Column G of the same row = "Snodgress" THEN copy cells A?:J? and paste into cells A?:J? of the "Snodgress" sheet. Of course skipping to the next available row and also the content should not repeat itself.
I have this code so far but it gives me an error about merged cells. I think that's because i have miscellaneous text outside of the designated "paste area". So the whole row shouldn't be pasted, just the specific range. Any suggestions?
In spreadsheet "Complete Backlog", if a cell in Column K = "Open" AND the cell in Column G of the same row = "Snodgress" THEN copy cells A?:J? and paste into cells A?:J? of the "Snodgress" sheet. Of course skipping to the next available row and also the content should not repeat itself.
I have this code so far but it gives me an error about merged cells. I think that's because i have miscellaneous text outside of the designated "paste area". So the whole row shouldn't be pasted, just the specific range. Any suggestions?
Code:
Sub copy_director_snod()
Dim i As Long, lrow As Long, lastrow As Long
With Worksheets("Complete Backlog")
lrow = .Range("a" & .Rows.Count).End(xlUp).Row
For i = 2 To lrow
If .Range("g" & i).Value = "Snodgress" Then
lastrow = Worksheets("Snodgress").Range("A" & Rows.Count).End(xlUp).Row
.Range("A" & i & ":L" & i).Copy Worksheets("Snodgress").Range("A" & lastrow + 1)
a = a + 1
End If
Next i
End With
End Sub