Hi! Maybe a silly and simple question but didn't find an answer...
I want to copy from Sheet 1 rows from columns A-B and E-I into Sheet 2 columns C-J. I was using this code to select entire row but like to change now...:
Sub CopyCell()
Dim LR As Long, i As Long
With Sheets("Sheet 1")
LR = .Range("H" & Rows.Count).End(xlUp).Row
For i = 1 To LR
If .Range("H" & i).Value = "Sales Person 1" And .Range("J" & i).Value = "Sold" Then .Rows(i).copy Destination:=Sheets("Sheet 2").Range("A" & Rows.Count).End(xlUp).Offset(1)
Next i
End With
End Sub
Thanks in advance!
I want to copy from Sheet 1 rows from columns A-B and E-I into Sheet 2 columns C-J. I was using this code to select entire row but like to change now...:
Sub CopyCell()
Dim LR As Long, i As Long
With Sheets("Sheet 1")
LR = .Range("H" & Rows.Count).End(xlUp).Row
For i = 1 To LR
If .Range("H" & i).Value = "Sales Person 1" And .Range("J" & i).Value = "Sold" Then .Rows(i).copy Destination:=Sheets("Sheet 2").Range("A" & Rows.Count).End(xlUp).Offset(1)
Next i
End With
End Sub
Thanks in advance!