Sneaky Pete 0 Light Poster

Dear everyone,

I have got a excelsheet with some vba code.
The sheet contains a row with columns with specific information.
When the user clicks a button, the code will look for the last row which contains data, copy the whole row, paste it beneath the row and the number in column B gets a + 1 value. So far so good.

Beneath every last row, I would like to have a specific text.
So when the user clicks the button, the program should do the same as above, but, also copy the specific text and copy that one row below.

So, when the users clicks the button, the program should look for the last row which contains a value, copy that row and the row above, then from the row above past the two rows one row below.

Below the code I have so far.

For i = 1 To 100
    If .Cells(LastRow, i).Value >= 0 Then
       .Cells(LastRow, i).Copy
       '.Cells(LastRow, i).Copy
       .Cells(LastRow, i).Offset(1, 0).PasteSpecial xlPasteValues
       .Cells(LastRow, i).Offset(1, 0).PasteSpecial xlPasteValuesAndNumberFormats
       .Cells(LastRow, i).Offset(1, 0).PasteSpecial xlPasteFormats
       .Cells(LastRow, i).Offset(1, 0).PasteSpecial xlPasteValidation

       .Cells(LastRow, "B").Offset(1, 0).Select
        ActiveCell.Value = Cells(LastRow, "B").Value + 1
        ActiveCell.Offset(0, 1).Select
     Else
End If
Next i

Can anybody give me a solution to manage this?

Thanx in advanced

Sneaky Pete

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.