billandrew
Well-known Member
- Joined
- Mar 9, 2014
- Messages
- 743
Hello All
I know this is incorrect , Can someone explain why all my data which meets the criteria <> 4 is not copied to sheet 7. Is the rows(j) the issue
I know this is incorrect , Can someone explain why all my data which meets the criteria <> 4 is not copied to sheet 7. Is the rows(j) the issue
Code:
Sub CopyNot4Q()
Dim lr1 As Long, p As Long
Dim ws As Worksheet
Set ws = Sheet6
ws.Activate
lr1 = ws.Range("B" & Rows.Count).End(xlUp).Row
For p = 2 To lr1
If Left(Cells(p, "B"), 1) <> 4 Then
Rows(p).Copy Destination:=Sheets("Sheet7").Range("A1")
End If
Next p