# Macros – How can I put a battery in this function? I have the following macros:

``````Sub schedule ()
LastRow = Worksheets ("Glider"). Cells (65536, 1) .End (xlUp) .Row
LastColumn = Worksheets ("Glider"). UsedRange.Columns (Worksheets ("Glider"). UsedRange.Columns.Count) .Column
For y = 9 at LastColumn
For x = 4 TB LastRow
Sheets ("Glider"). Cells (x, y) .ClearContents
Worksheets ("Glider"). Cells (x, y) .Interior.ColorIndex = xlNone
Next X
Next and

For i = 4 at LastRow
counter = 0
MyNumber = (LastColumn - Worksheets ("Glider"). Cells (i, 8) .Value - 7) / Worksheets ("Glider"). Cells (i, 7) .Value
For j = 1 to IIf (Int (MyNumber) = MyNumber, MyNumber, Int (MyNumber) + 1)
MyColumn = Worksheets ("Glider"). Cells (i, 8) + Worksheets ("Glider"). Cells (i, 7) * counter + 8
Sheets ("Glider"). Cells (i, MyColumn) = Worksheets ("Glider"). Cells (i, 5) + (Spreadsheets ("Glider") Cells (i, 7)) * 7
Sheets ("Glider"). Cells (i, MyColumn) .Interior.ColorIndex = 36
counter = counter + 1
Next j
Then I
End Sub
``````

What he does, is that he puts what a text / operation / etc. in a certain interval. But the problem is that I can not get the data that places the macros intercalated to increase, dictates: in the image, you can see that the intercalated data is a date, but it does not matter. is the same date at all intervals I do not know how to increase it by 30 or 60 days in the calendar. This is determined in "Sheets (" Glider ") Cells (i, MyColumn) = Sheets (" Glider ") Cells (i, 5) + (Sheets (" Glider "). i, 7)) * 7 "in which I recommend that you place the product of the values ​​in column 5 multiplied by 7.  