I made the following code in VBA (visual basic for application) in EXCEl so that through an associated MACRO, it can generate rows from "copy" a "base" row. The code that I have elaborated is the following:
Sub Afilacalcderegulacion()
ActiveSheet.Unprotect "cyf"
Dim i As Integer
Dim CurrentSheet As Object
i = 15
While (Cells(i, 1) <> "")
i = i + 1
Wend
Range("B" & i).EntireRow.Insert
ActiveSheet.Protect "cyf"
End Sub
How can you realize, what I do not want is to have i = 15 there so that through the function rank can insert the row Since with this what happens is the following: Here I insert content in row 15, without using the add rows button.
Here when I use the macro button that inserts rows. As you can see, the text inserted in row B15 (the immediately after plant-transfer) is moved so many times, insert a row.