Hi All
When the code below gets to the end I get a type mismatch error, have i missed something off the end.
Also is there a quicker way of doing this?
Many thanks in advance
Paul
When the code below gets to the end I get a type mismatch error, have i missed something off the end.
Also is there a quicker way of doing this?
Many thanks in advance
Paul
VBA Code:
Sub Copy_Darren_To_his_Sheet()
Dim LastRow As Long
'Find last used row in a Column B of MiReg Installations
With Worksheets("MiReg Installations")
LastRow = .Cells(.Rows.Count, "B").End(xlUp).Row
End With
'Find first row where values should be posted in Darren Jones
With Worksheets("Darren Jones")
j = .Cells(.Rows.Count, "A").End(xlUp).Row + 1
End With
For i = 1 To LastRow
With Worksheets("MiReg Installations")
If .Cells(i, 2).Value = "Darren Jones" Then
.Rows(i).Copy Destination:=Worksheets("Darren Jones").Range("A" & j)
j = j + 1
End If
End With
Next i
End Sub