NNDRIANA
03-30-2012, 02:33 AM
Hi,
this code copy cells from sheet "2" to sheet "1".
I want to add a code allowing me to copy with a condition these value.
here is my file.
Regards.
Sub Macro1()
Dim i As Integer, derlig As Long
With Sheets("2")
lastlig = .Range("A" & .Rows.Count).End(xlUp).Row
For i = 2 To lastlig
Sheets("1").Cells(i, 4) = .Cells(i, 2)
Sheets("1").Cells(i, 5) = .Cells(i, 2).Offset(0, 1)
Next i
End With
End Sub
this code copy cells from sheet "2" to sheet "1".
I want to add a code allowing me to copy with a condition these value.
here is my file.
Regards.
Sub Macro1()
Dim i As Integer, derlig As Long
With Sheets("2")
lastlig = .Range("A" & .Rows.Count).End(xlUp).Row
For i = 2 To lastlig
Sheets("1").Cells(i, 4) = .Cells(i, 2)
Sheets("1").Cells(i, 5) = .Cells(i, 2).Offset(0, 1)
Next i
End With
End Sub