Hi
I have this code to copy rows from sheet "data" to sheet "översikt".
Private Sub CommandButton1_Click()
Range("A2:E100").Clear
Dim i As Integer
Dim ws1 As Worksheet: Set ws1 = ThisWorkbook.Sheets("Data")
Dim ws2 As Worksheet: Set ws2 = ThisWorkbook.Sheets("Översikt")
For i = 3 To ws1.Range("A65536").End(xlUp).Row
If ws1.Cells(i, 3) > 0 Or ws1.Cells(i, 5) > 0 Then ws1.Rows(i).Copy ws2.Rows(ws2.Cells(ws2.Rows.Count, 2).End(xlUp).Row + 1)
Next i
Blad1.Range("E2:E100").Font.Italic = True
Blad1.Range("A1:AF100").Interior.ColorIndex = 2
End Sub
Everything works fine exept i cant figure how to controll wich line it starts to paste from.
Right now i have a header on Row1 and it starts to paste in row 2.
I want to be able to choose with row it should start from like row 4 or 5, wich section of the code controlls that ?
Petter
Bookmarks