I have made this code to copy conditionally into sheet(1). I basically copies the entire row into sheet(1) only of the rows that in Colunm I is between 10 - 200.
Now I want to only copy the thing in that is from colunm I to O. And I want to copy it into sheet(1) in Range ("M20:S")
Hope you understand my question.
Best regards
Esben
Sub Copy()
Dim cell As Range
Dim LastRow As Long, i As Long
Sheets(2).Activate
LastRow = Range ("I" & Rows.Count).End(x1Up).Row
i = 1
For Each cell In Sheets(2).Range("I1:I" & LastRow)
If cell.Value > 10 And cell.Value < 200 Then
Cell.EntireRow.Copy Sheets(1).Cell( i, 1 )
i = i + 1
End If
Next
End Sub
Bookmarks