sandor jeges
New Member
- Joined
- May 26, 2016
- Messages
- 13
This is my current code can anyone help to make it so all rows from the performanceEQ sheet to copy to Output with the rule copy row over if there is a data in cell B2 down, then when there is no more data in the B Column, copy the same row but with the rule IF there is data in cell D2 down until there is no more data - Can anyone help!!!!???
Code:
Sub Stocktransfer()
Set i = Sheets("PerformanceEQ")
Set e = Sheets("Output")
Dim d
Dim j
d = 1
j = 2
'FOR THE SELLER
Do Until IsEmpty(i.Range("B" & j))
If i.Range("B" & j) = "VEAEWP" Then
d = d + 1
e.Rows(d).Value = i.Rows(j).Value
End If
j = j + 1
Loop
'FOR THE SELLER
Do Until IsEmpty(i.Range("D" & j))
If i.Range("D" & k) = "VERGRE" Then
d = d + 1
e.Rows(d).Value = i.Rows(d).Value
End If
j = j + 1
Loop
End Sub
Last edited by a moderator: