brankscaffold
New Member
- Joined
- Jun 15, 2022
- Messages
- 18
- Office Version
- 365
- Platform
- Windows
I got this one off the net, but I can't get it to work quite right.
now only 2 lines are copied and always the same
now only 2 lines are copied and always the same
VBA Code:
Sub rowcopy()
Const FirstRow = 2
Dim rij As Long
Dim n As Long
Dim src As Worksheet
Dim trg As Worksheet
Dim SrcRow As Long
Dim lastRow As Long
Set src = Sheets("Ridon 22")
Set trg = Sheets("Asindo 22")
Application.ScreenUpdating = False
rij = trg.[A65536].End(xlUp).Row
For n = 5 To Blad1.[A65536].End(xlUp).Row
If Cells(n, "AE").Value = "Asindo" Then
Range(Cells(n, "A"), Cells(n, "AZ")).Copy
trg.Cells(rij, "A").PasteSpecial