Hi,
jewelsharmaear previously kindly provided me with the code below to check our master staff list and copy and paste service specific extracts to relevantly names worksheets within the same workbook. I'm eondering if it would be possible to paste the extracts to a seperate workbook rather than to sheets within original workbook.
The original workbook is named master stafflist and I would like to paste to a workbook called service extract.
Any help would be much appreciated.
Thank you.
---------
Sub Copy_Rows_To_Worksheet()
Dim iRow as Integer, iPasteRow as Integer, sWs as string
With ThisWorkbook.Worksheets("Staff List")
For iRow = 2 to .Cells(.Rows.Count, "A").End(xlUp).Row
sWs = .Range("A" & iRow)
iPasteRow = ThisWorkbook.Worksheets(sWs).Cells(Rows.Count, "A").End(xlUp).Row + 1
.Range("A" & iRow & ":V" & iRow).Copy Destination:= ThisWorkbook.Worksheets(sWs).Range("A" & iPasteRow & ":V" & iPasteRow)
Next iRow
End With
End Sub
---------
Bookmarks